Struct fuchsia_inspect_contrib::graph::Metadata
source · pub struct Metadata<'a> { /* private fields */ }
Expand description
A metadata item used to initialize metadata key value pairs of nodes and edges.
Implementations§
source§impl<'a> Metadata<'a>
impl<'a> Metadata<'a>
sourcepub fn new(
key: impl Into<Cow<'a, str>>,
value: impl Into<MetadataValue<'a>>,
) -> Self
pub fn new( key: impl Into<Cow<'a, str>>, value: impl Into<MetadataValue<'a>>, ) -> Self
Create a new metadata item with the given key
and value
.
pub fn nested( key: impl Into<Cow<'a, str>>, value: impl IntoIterator<Item = Metadata<'a>> + 'a, ) -> Self
sourcepub fn track_events(self) -> Self
pub fn track_events(self) -> Self
Require that changes to this metadata node must be tracked. To support tracking events about changes the graph must be configured to support tracking events. This is a no-op if called on a nested node. It only works on leaf properties.
Auto Trait Implementations§
impl<'a> Freeze for Metadata<'a>
impl<'a> !RefUnwindSafe for Metadata<'a>
impl<'a> !Send for Metadata<'a>
impl<'a> !Sync for Metadata<'a>
impl<'a> Unpin for Metadata<'a>
impl<'a> !UnwindSafe for Metadata<'a>
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