[−][src]Struct sppparse::SparseState
Implementations
impl SparseState
[src]
pub fn new_from_file(path: PathBuf) -> Result<Self, SparseError>
[src]
Create a new SparseState
from a root file
pub fn new_from_value(path: PathBuf, val: Value) -> Result<Self, SparseError>
[src]
Create a new SparseState
from an in memory Value
pub fn get_root_path(&self) -> &PathBuf
[src]
Get the root path of the state, if any
pub fn get_state_file<'a>(
&'a self,
path: &PathBuf
) -> Result<&'a SparseStateFile, SparseError>
[src]
&'a self,
path: &PathBuf
) -> Result<&'a SparseStateFile, SparseError>
pub fn parse_root<S: DeserializeOwned + Serialize + SparsableTrait>(
&mut self
) -> Result<S, SparseError>
[src]
&mut self
) -> Result<S, SparseError>
Deserialize the root document from the state to the type S
pub fn parse_file<S: DeserializeOwned + Serialize + SparsableTrait>(
&mut self,
path: PathBuf
) -> Result<S, SparseError>
[src]
&mut self,
path: PathBuf
) -> Result<S, SparseError>
Deserialize a document from the state to the type S
pub fn add_value(
&mut self,
path: PathBuf,
value: Value
) -> Result<(), SparseError>
[src]
&mut self,
path: PathBuf,
value: Value
) -> Result<(), SparseError>
Deserialize a file from the state to the type S
pub fn add_obj<S: DeserializeOwned + Serialize + SparsableTrait>(
&mut self,
path: PathBuf,
obj: &mut S
) -> Result<(), SparseError>
[src]
&mut self,
path: PathBuf,
obj: &mut S
) -> Result<(), SparseError>
Deserialize a file from the state to the type S
pub fn add_file(&mut self, path: &PathBuf) -> Result<(), SparseError>
[src]
Deserialize a file from the state to the type S
pub fn save_to_disk(
&self,
format: Option<SparseFileFormat>
) -> Result<(), SparseError>
[src]
&self,
format: Option<SparseFileFormat>
) -> Result<(), SparseError>
Write all the files in the states to disks It'll try not to modify anything until it's sure it can open every file for writing
Trait Implementations
impl Clone for SparseState
[src]
pub fn clone(&self) -> SparseState
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SparseState
[src]
Auto Trait Implementations
impl RefUnwindSafe for SparseState
[src]
impl Send for SparseState
[src]
impl Sync for SparseState
[src]
impl Unpin for SparseState
[src]
impl UnwindSafe for SparseState
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,