rkyv 0.8.16

Zero-copy deserialization framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::ser::{sharing::SharingState, Sharing};

/// A shared pointer strategy that duplicates serializations of the same shared
/// pointer.
#[derive(Debug, Default)]
pub struct Unshare;

impl<E> Sharing<E> for Unshare {
    fn start_sharing(&mut self, _: usize) -> SharingState {
        SharingState::Started
    }

    fn finish_sharing(&mut self, _: usize, _: usize) -> Result<(), E> {
        Ok(())
    }
}