pub struct ResourceGroupToken { /* private fields */ }Expand description
A token associated with a specific resource group.
Used to attribute allocations and deallocations to a specific group with a scope guard ResourceTrackingGuard, or
through helpers provided by the Track trait.
Implementations§
Source§impl ResourceGroupToken
impl ResourceGroupToken
Sourcepub fn enter(&self) -> ResourceTrackingGuard<'_>
pub fn enter(&self) -> ResourceTrackingGuard<'_>
Enters this resource group, returning a guard that will exit the resource group when dropped.
Trait Implementations§
Source§impl Clone for ResourceGroupToken
impl Clone for ResourceGroupToken
Source§fn clone(&self) -> ResourceGroupToken
fn clone(&self) -> ResourceGroupToken
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResourceGroupToken
impl Send for ResourceGroupToken
impl Sync for ResourceGroupToken
Auto Trait Implementations§
impl Freeze for ResourceGroupToken
impl RefUnwindSafe for ResourceGroupToken
impl Unpin for ResourceGroupToken
impl UnsafeUnpin for ResourceGroupToken
impl UnwindSafe for ResourceGroupToken
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Wrap the input message
T in a tonic::RequestSource§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self> ⓘ
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self> ⓘ
Instruments this type by attaching the given resource group token, returning a
Tracked wrapper. Read more