pub enum SparsePointedValue<S> {
RefRaw(Box<SparseRefRaw<S>>),
Obj(S),
Ref(SparseRef<S>),
Null,
}
Expand description
§A raw selector between a raw object, a raw pointer or an owned pointer
The SparsePointedValue allows to switch between a raw, unparsed pointer to a parsed pointer resolved at initialization.
Variants§
Implementations§
Source§impl<S> SparsePointedValue<S>
impl<S> SparsePointedValue<S>
pub fn default_boxed() -> Box<Self>
Trait Implementations§
Source§impl<S: Clone> Clone for SparsePointedValue<S>
impl<S: Clone> Clone for SparsePointedValue<S>
Source§fn clone(&self) -> SparsePointedValue<S>
fn clone(&self) -> SparsePointedValue<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<S: Debug> Debug for SparsePointedValue<S>
impl<S: Debug> Debug for SparsePointedValue<S>
Source§impl<S> Default for SparsePointedValue<S>
impl<S> Default for SparsePointedValue<S>
Source§impl<'de, S> Deserialize<'de> for SparsePointedValue<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for SparsePointedValue<S>where
S: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<S: PartialEq> PartialEq for SparsePointedValue<S>
impl<S: PartialEq> PartialEq for SparsePointedValue<S>
Source§impl<S> Serialize for SparsePointedValue<S>where
S: Serialize,
impl<S> Serialize for SparsePointedValue<S>where
S: Serialize,
Source§impl<S> Sparsable for SparsePointedValue<S>
impl<S> Sparsable for SparsePointedValue<S>
Source§fn sparse_init(
&mut self,
state: &mut SparseState,
metadata: &SparseMetadata,
depth: u32,
) -> Result<(), SparseError>
fn sparse_init( &mut self, state: &mut SparseState, metadata: &SparseMetadata, depth: u32, ) -> Result<(), SparseError>
Initialize recusively a Sparsable pointer
Source§fn sparse_updt<'a>(
&mut self,
state: &mut SparseState,
metadata: &SparseMetadata,
depth: u32,
) -> Result<(), SparseError>
fn sparse_updt<'a>( &mut self, state: &mut SparseState, metadata: &SparseMetadata, depth: u32, ) -> Result<(), SparseError>
Update recusively a Sparsable pointer
Source§fn check_depth(&self, depth: u32) -> Result<(), SparseError>
fn check_depth(&self, depth: u32) -> Result<(), SparseError>
Check if the current depth isn’t too much.
This is the cyclic pointer protection mechanism
Source§impl<S> SparsePointerRaw<S> for SparsePointedValue<S>
impl<S> SparsePointerRaw<S> for SparsePointedValue<S>
Source§fn check_version<'a>(
&'a self,
state: &'a SparseState,
) -> Result<(), SparseError>
fn check_version<'a>( &'a self, state: &'a SparseState, ) -> Result<(), SparseError>
Check if the inner value is outdated
Source§fn get<'a>(
&'a self,
metadata: Option<&'a SparseMetadata>,
) -> Result<SparseValue<'a, S>, SparseError>
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>
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 self_reset<'a>(
&mut self,
state: &mut SparseState,
metadata: &'a SparseMetadata,
depth: u32,
) -> Result<(), SparseError>
fn self_reset<'a>( &mut self, state: &mut SparseState, metadata: &'a SparseMetadata, depth: u32, ) -> Result<(), SparseError>
Reset the inner value and parse it again from the state
impl<S> StructuralPartialEq for SparsePointedValue<S>
Auto Trait Implementations§
impl<S> Freeze for SparsePointedValue<S>where
S: Freeze,
impl<S> RefUnwindSafe for SparsePointedValue<S>where
S: RefUnwindSafe,
impl<S> Send for SparsePointedValue<S>where
S: Send,
impl<S> Sync for SparsePointedValue<S>where
S: Sync,
impl<S> Unpin for SparsePointedValue<S>where
S: Unpin,
impl<S> UnwindSafe for SparsePointedValue<S>where
S: UnwindSafe,
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