Skip to main content

MetadataWeave

Trait MetadataWeave 

Source
pub trait MetadataWeave<K, N, T, M>: Weave<K, N, T>
where K: Hash + Copy + Eq + Ord, N: Node<K, T>,
{ // Required methods fn metadata(&self) -> &M; fn metadata_mut<O>(&mut self, callback: impl FnOnce(&mut M) -> O) -> O; }
Expand description

A Weave containing document-wide metadata.

§Panics

All panics should be assumed to leave the Weave in a malformed state unless otherwise specified by the implementation.

Required Methods§

Source

fn metadata(&self) -> &M

Returns a reference to the Weave’s associated metadata.

Source

fn metadata_mut<O>(&mut self, callback: impl FnOnce(&mut M) -> O) -> O

Mutable access to the Weave’s associated metadata.

§Panics

May panic if callback panics.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<K, T, M, S> MetadataWeave<K, DependentNode<K, T, S>, T, M> for DependentWeave<K, T, M, S>
where K: Hash + Copy + Eq + Ord, S: BuildHasher + Default + Clone,

Source§

impl<K, T, M, S> MetadataWeave<K, IndependentNode<K, T, S>, T, M> for IndependentWeave<K, T, M, S>

Source§

impl<W, K, N, T, M> MetadataWeave<K, N, T, M> for CountedWeave<W, K, N, T>
where W: MetadataWeave<K, N, T, M>, K: Hash + Copy + Eq + Ord, N: Node<K, T>,

Source§

impl<W, K, N, T, M> MetadataWeave<K, N, T, M> for LoggedWeave<W, K, N, T, M>
where W: MetadataWeave<K, N, T, M>, K: Hash + Copy + Eq + Ord, N: Node<K, T> + Clone, M: Clone,