Trait rkyv::ser::SharingExt
source · pub trait SharingExt<E>: Sharing<E> {
// Provided methods
fn get_shared<T: ?Sized>(&self, value: &T) -> Option<usize> { ... }
fn add_shared<T: ?Sized>(&mut self, value: &T, pos: usize) -> Result<(), E> { ... }
fn serialize_shared<T: SerializeUnsized<Self> + ?Sized>(
&mut self,
value: &T
) -> Result<usize, <Self as Fallible>::Error>
where Self: Fallible<Error = E> { ... }
}
Expand description
TODO: Document this
Provided Methods§
Gets the position of a previously-added shared value.
Returns None
if the value has not yet been added.
Adds the position of a shared value to the registry.
Archives the given shared value and returns its position. If the value has already been added then it returns the position of the previously added value.
Object Safety§
This trait is not object safe.