pub struct TagSetMutView<'a, 'b> { /* private fields */ }Expand description
A lazy copy-on-write mutable view over a Context’s tag sets.
Operations on this view (e.g. retain_tags) are recorded but not
applied immediately. The actual Arc clone, mutation, and context key recomputation only
occur when finish is called, and only if changes were recorded.
Implementations§
Source§impl<'a, 'b> TagSetMutView<'a, 'b>
impl<'a, 'b> TagSetMutView<'a, 'b>
Scan instrumented tags with the given predicate.
Tags for which f returns false are flagged for removal. This is a read-only scan;
no mutation occurs until finish is called.
Scan origin tags with the given predicate.
Tags for which f returns false are flagged for removal. This is a read-only scan;
no mutation occurs until finish is called.
Sourcepub fn finish(self) -> usize
pub fn finish(self) -> usize
Apply all recorded changes and return the total number of tags affected.
If no changes were recorded, this is a no-op: no Arc clone, no rehash, returns 0.
Otherwise, triggers Arc::make_mut on the context, applies the changes to both tag sets,
and recomputes the context key.
Returns the number of tags removed.
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'b> Freeze for TagSetMutView<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for TagSetMutView<'a, 'b>
impl<'a, 'b> Send for TagSetMutView<'a, 'b>
impl<'a, 'b> Sync for TagSetMutView<'a, 'b>
impl<'a, 'b> Unpin for TagSetMutView<'a, 'b>
impl<'a, 'b> UnsafeUnpin for TagSetMutView<'a, 'b>
impl<'a, 'b> !UnwindSafe for TagSetMutView<'a, 'b>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Tracked wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Tracked wrapper. Read more