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]
impl RAMDirectory
pub fn create() -> RAMDirectory
[src]
pub fn create() -> RAMDirectory
Constructor
Trait Implementations
impl Debug for RAMDirectory
[src]
impl Debug for RAMDirectory
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for RAMDirectory
[src]
impl Clone for RAMDirectory
fn clone(&self) -> RAMDirectory
[src]
fn clone(&self) -> RAMDirectory
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Directory for RAMDirectory
[src]
impl Directory for RAMDirectory
fn open_read(&self, path: &Path) -> Result<ReadOnlySource, OpenReadError>
[src]
fn open_read(&self, path: &Path) -> Result<ReadOnlySource, OpenReadError>
Opens a virtual file for read. Read more
fn open_write(&mut self, path: &Path) -> Result<WritePtr, OpenWriteError>
[src]
fn open_write(&mut self, path: &Path) -> Result<WritePtr, OpenWriteError>
Opens a writer for the virtual file associated with a Path. Read more
fn delete(&self, path: &Path) -> Result<(), DeleteError>
[src]
fn delete(&self, path: &Path) -> Result<(), DeleteError>
Removes a file Read more
fn exists(&self, path: &Path) -> bool
[src]
fn exists(&self, path: &Path) -> bool
Returns true iff the file exists
fn atomic_read(&self, path: &Path) -> Result<Vec<u8>, OpenReadError>
[src]
fn atomic_read(&self, path: &Path) -> Result<Vec<u8>, OpenReadError>
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]
fn atomic_write(&mut self, path: &Path, data: &[u8]) -> Result<()>
Atomically replace the content of a file with data. Read more
Auto Trait Implementations
impl Send for RAMDirectory
impl Send for RAMDirectory
impl Sync for RAMDirectory
impl Sync for RAMDirectory