pub struct MutableMetadataHandle(/* private fields */);Expand description
A shared handle to a MutableMetadata.
This is a cheap-to-clone Arc<ArcSwap<MutableMetadata>>: all clones observe the same
underlying value. See the
module documentation for the write/read protocol.
Implementations§
Source§impl MutableMetadataHandle
impl MutableMetadataHandle
Sourcepub fn load(&self) -> Guard<Arc<MutableMetadata>>
pub fn load(&self) -> Guard<Arc<MutableMetadata>>
Load the value of the handle
Sourcepub fn load_full(&self) -> Arc<MutableMetadata> ⓘ
pub fn load_full(&self) -> Arc<MutableMetadata> ⓘ
Load the value of the handle, cloned into an owning Arc.
Sourcepub fn set_runtime_id(&self, runtime_id: String)
pub fn set_runtime_id(&self, runtime_id: String)
Set the runtime_id value
Set the process tags value
Sourcepub fn update<F>(&self, f: F)
pub fn update<F>(&self, f: F)
Update the handle value with the result of f.
Use this method to update multiple fields at once. Modify the supplied snapshot rather than replacing it with a previously loaded value. The closure may run more than once when another writer updates the handle concurrently.
Trait Implementations§
Source§impl Clone for MutableMetadataHandle
impl Clone for MutableMetadataHandle
Source§impl Debug for MutableMetadataHandle
impl Debug for MutableMetadataHandle
Source§impl Default for MutableMetadataHandle
impl Default for MutableMetadataHandle
Source§impl From<MutableMetadata> for MutableMetadataHandle
impl From<MutableMetadata> for MutableMetadataHandle
Source§fn from(value: MutableMetadata) -> Self
fn from(value: MutableMetadata) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MutableMetadataHandle
impl RefUnwindSafe for MutableMetadataHandle
impl Send for MutableMetadataHandle
impl Sync for MutableMetadataHandle
impl Unpin for MutableMetadataHandle
impl UnsafeUnpin for MutableMetadataHandle
impl UnwindSafe for MutableMetadataHandle
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