Struct tantivy::directory::RAMDirectory
[−]
[src]
pub struct RAMDirectory { /* fields omitted */ }
A Directory storing everything in anonymous memory.
It is mainly meant for unit testing. Writes are only made visible upon flushing.
Methods
impl RAMDirectory
[src]
pub fn create() -> RAMDirectory
[src]
Constructor
Trait Implementations
impl Debug for RAMDirectory
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for RAMDirectory
[src]
fn clone(&self) -> RAMDirectory
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Directory for RAMDirectory
[src]
fn open_read(&self, path: &Path) -> Result<ReadOnlySource, OpenReadError>
[src]
Opens a virtual file for read. Read more
fn open_write(&mut self, path: &Path) -> Result<WritePtr, OpenWriteError>
[src]
Opens a writer for the virtual file associated with a Path. Read more
fn delete(&self, path: &Path) -> Result<(), DeleteError>
[src]
Removes a file Read more
fn exists(&self, path: &Path) -> bool
[src]
Returns true iff the file exists
fn atomic_read(&self, path: &Path) -> Result<Vec<u8>, OpenReadError>
[src]
Reads the full content file that has been written using atomic_write. Read more
fn atomic_write(&mut self, path: &Path, data: &[u8]) -> Result<()>
[src]
Atomically replace the content of a file with data. Read more
ⓘImportant traits for Box<R>fn box_clone(&self) -> Box<Directory>
[src]
ⓘImportant traits for Box<R>
Clones the directory and boxes the clone