SparsePointerRaw

Trait SparsePointerRaw 

Source
pub trait SparsePointerRaw<S: DeserializeOwned + Serialize + SparsableTrait> {
    // Required methods
    fn get<'a>(
        &'a self,
        metadata: Option<&'a SparseMetadata>,
    ) -> Result<SparseValue<'a, S>, SparseError>;
    fn get_mut<'a>(
        &'a mut self,
        state_cell: Rc<RefCell<SparseState>>,
        metadata: Option<&'a SparseMetadata>,
    ) -> Result<SparseValueMut<'a, S>, SparseError>;
    fn check_version(&self, state: &SparseState) -> Result<(), SparseError>;
    fn self_reset(
        &mut self,
        state: &mut SparseState,
        metadata: &SparseMetadata,
        depth: u32,
    ) -> Result<(), SparseError>;
}
Expand description

§Base shared by raw pointers

Required Methods§

Source

fn get<'a>( &'a self, metadata: Option<&'a SparseMetadata>, ) -> Result<SparseValue<'a, S>, SparseError>

Get the inner value of the pointer

Source

fn get_mut<'a>( &'a mut self, state_cell: Rc<RefCell<SparseState>>, metadata: Option<&'a SparseMetadata>, ) -> Result<SparseValueMut<'a, S>, SparseError>

Get the inner value of the pointer (mutable)

Source

fn check_version(&self, state: &SparseState) -> Result<(), SparseError>

Check if the inner value is outdated

Source

fn self_reset( &mut self, state: &mut SparseState, metadata: &SparseMetadata, depth: u32, ) -> Result<(), SparseError>

Reset the inner value and parse it again from the state

Implementors§