Struct body_image::barc::BarcFile [−][src]
pub struct BarcFile { /* fields omitted */ }
Reference to a BARC File by Path
, supporting up to 1 writer and N
readers concurrently.
Methods
impl BarcFile
[src]
impl BarcFile
pub fn new<P>(path: P) -> BarcFile where
P: AsRef<Path>,
[src]
pub fn new<P>(path: P) -> BarcFile where
P: AsRef<Path>,
Return new instance for the specified path, which may be an
existing file, or one to be created when writer
is opened.
pub fn writer(&self) -> Result<BarcWriter, BarcError>
[src]
pub fn writer(&self) -> Result<BarcWriter, BarcError>
Get a writer for this file, opening the file for write (and
possibly creating it, or erroring) if this is the first time
called. May block on the write lock, as only one BarcWriter
instance is allowed.
pub fn reader(&self) -> Result<BarcReader, BarcError>
[src]
pub fn reader(&self) -> Result<BarcReader, BarcError>
Get a reader for this file. Errors if the file does not exist.