[][src]Struct sppparse::SparseRefRaw

pub struct SparseRefRaw<S: DeserializeOwned + Serialize + SparsableTrait> { /* 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: DeserializeOwned + Serialize + SparsableTrait> SparseRefRaw<S>[src]

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: DeserializeOwned + Serialize + SparsableTrait> 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 + DeserializeOwned + Serialize + SparsableTrait> Clone for SparseRefRaw<S>[src]

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

impl<'de, S: DeserializeOwned + Serialize + SparsableTrait> Deserialize<'de> for SparseRefRaw<S> where
    S: DeserializeOwned + Serialize + SparsableTrait
[src]

impl<S: DeserializeOwned + Serialize + SparsableTrait> Serialize for SparseRefRaw<S> where
    S: DeserializeOwned + Serialize + SparsableTrait
[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]

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

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

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

Get the inner value, deserializing the pointed value

Auto Trait Implementations

impl<S> RefUnwindSafe for SparseRefRaw<S> where
    S: RefUnwindSafe
[src]

impl<S> Send for SparseRefRaw<S> where
    S: Send
[src]

impl<S> Sync for SparseRefRaw<S> where
    S: Sync
[src]

impl<S> Unpin for SparseRefRaw<S> where
    S: Unpin
[src]

impl<S> UnwindSafe for SparseRefRaw<S> where
    S: UnwindSafe
[src]

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>,