[][src]Struct flatdata::MemoryResourceStorage

pub struct MemoryResourceStorage { /* fields omitted */ }

Resource storage in memory.

Methods

impl MemoryResourceStorage
[src]

pub fn new<P: Into<PathBuf>>(path: P) -> Rc<Self>
[src]

Create an empty memory resource storage at a given virtual path.

Resources will be placed in ephemeral memory with prefix path. A path has to be provided to unify the interface with FileResourceStorage.

Trait Implementations

impl ResourceStorage for MemoryResourceStorage
[src]

fn read(
    &self,
    resource_name: &str,
    schema: &str
) -> Result<&[u8], ResourceStorageError>
[src]

Open a flatdata resource with given name and schema for reading. Read more

fn write(&self, resource_name: &str, schema: &str, data: &[u8]) -> Result<()>
[src]

Writes data of a flatdata resource with given name and schema to storage. Read more

fn read_and_check_schema(
    &self,
    resource_name: &str,
    expected_schema: &str
) -> Result<&[u8], ResourceStorageError>
[src]

Implementation helper for [read]. Read more

impl Debug for MemoryResourceStorage
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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