Struct sppparse::SparseRefRaw[][src]

pub struct SparseRefRaw<S> { /* fields omitted */ }

A raw dynamic ref

SparseRefRaw will render the pointed value.

It uses a SparseState to render itself in order to limit the IO calls at a minimum. It will deserialize into the desired type at creation.

If the SparseStateFile used to render the object changes, SparseRefRaw will deserialize it again in order to always be up to date.

Implementations

impl<S> SparseRefRaw<S>[src]

pub fn val(&self) -> &SparsePointedValue<S>[src]

The inner value

pub fn raw_pointer(&self) -> &String[src]

The raw JSON pointer, as it is deserialized

pub fn base_path(&self) -> &PathBuf[src]

The path of the file in which originates this pointer, if any

impl<S> SparseRefRaw<S>[src]

pub fn base_path_mut(&mut self) -> &mut PathBuf[src]

The path of the file in which originates this pointer, if any

impl<S> SparseRefRaw<S> where
    S: DeserializeOwned + Serialize + SparsableTrait
[src]

pub fn new(raw_pointer: String) -> Self[src]

Trait Implementations

impl<S: Clone> Clone for SparseRefRaw<S>[src]

impl<S: Debug> Debug for SparseRefRaw<S>[src]

impl<'de, S> Deserialize<'de> for SparseRefRaw<S>[src]

impl<S: PartialEq> PartialEq<SparseRefRaw<S>> for SparseRefRaw<S>[src]

impl<S> Serialize for SparseRefRaw<S>[src]

impl<S> Sparsable for SparseRefRaw<S> where
    S: DeserializeOwned + Serialize + SparsableTrait
[src]

impl<S> SparsePointerRaw<S> for SparseRefRaw<S> where
    S: DeserializeOwned + Serialize + SparsableTrait
[src]

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

Check that the inner version doesn’t mismatch with the SparseState

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

Get the inner value, deserializing the pointed value

impl<S> StructuralPartialEq for SparseRefRaw<S>[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for SparseRefRaw<S> where
    S: RefUnwindSafe

impl<S> Send for SparseRefRaw<S> where
    S: Send

impl<S> Sync for SparseRefRaw<S> where
    S: Sync

impl<S> Unpin for SparseRefRaw<S> where
    S: Unpin

impl<S> UnwindSafe for SparseRefRaw<S> where
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,