[][src]Struct flatdata::FileResourceStorage

pub struct FileResourceStorage { /* fields omitted */ }

Resource storage on disk using memory mapped files.

Methods

impl FileResourceStorage
[src]

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

Create an empty memory mapped file storage at a given path.

Trait Implementations

impl ResourceStorage for FileResourceStorage
[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 FileResourceStorage
[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]