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