Struct flatdata::FileResourceStorage
[−]
[src]
pub struct FileResourceStorage { /* fields omitted */ }Resource storage on disk using memory mapped files.
Methods
impl FileResourceStorage[src]
Trait Implementations
impl Debug for FileResourceStorage[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl ResourceStorage for FileResourceStorage[src]
fn subdir(&self, dir: &str) -> Rc<RefCell<ResourceStorage>>[src]
Creates a resource storage at a given subdirectory.
fn exists(&self, resource_name: &str) -> bool[src]
Returns true if resource exists in the storage.
fn read_resource(
&mut self,
resource_name: &str
) -> Result<MemoryDescriptor, Error>[src]
&mut self,
resource_name: &str
) -> Result<MemoryDescriptor, Error>
Reads a resource in storage and returns a pointer to its raw data. Read more
fn create_output_stream(
&mut self,
resource_name: &str
) -> Result<Rc<RefCell<Stream>>, Error>[src]
&mut self,
resource_name: &str
) -> Result<Rc<RefCell<Stream>>, Error>
Creates a resource with given name and returns an output stream for writing to it. Read more
fn read(
&mut self,
resource_name: &str,
schema: &str
) -> Result<MemoryDescriptor, ResourceStorageError>[src]
&mut self,
resource_name: &str,
schema: &str
) -> Result<MemoryDescriptor, ResourceStorageError>
Open a flatdata resource with given name and schema for reading. Read more
fn write(
&mut self,
resource_name: &str,
schema: &str,
data: &[u8]
) -> Result<()>[src]
&mut self,
resource_name: &str,
schema: &str,
data: &[u8]
) -> Result<()>
Writes data of a flatdata resource with given name and schema to storage. Read more
fn read_and_check_schema(
&mut self,
resource_name: &str,
expected_schema: &str
) -> Result<MemoryDescriptor, ResourceStorageError>[src]
&mut self,
resource_name: &str,
expected_schema: &str
) -> Result<MemoryDescriptor, ResourceStorageError>
Implementation helper for [read]. Read more