pub struct FileStorage { /* private fields */ }Implementations§
Source§impl FileStorage
impl FileStorage
pub fn open(path: impl AsRef<Path>) -> Result<Self, StorageOpenError>
pub fn open_or_create(path: impl AsRef<Path>) -> Result<Self>
pub fn path(&self) -> &Path
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn bytes(&self) -> &[u8] ⓘ
pub fn read_range(&self, start: usize, end: usize) -> &[u8] ⓘ
pub fn write_all(&self, data: &[u8]) -> Result<Self>
pub fn matches_live_file_contents(&self) -> Result<bool>
Trait Implementations§
Source§impl Clone for FileStorage
impl Clone for FileStorage
Source§fn clone(&self) -> FileStorage
fn clone(&self) -> FileStorage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileStorage
impl RefUnwindSafe for FileStorage
impl Send for FileStorage
impl Sync for FileStorage
impl Unpin for FileStorage
impl UnsafeUnpin for FileStorage
impl UnwindSafe for FileStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more