pub struct PosixWritableFile { /* private fields */ }Expand description
Implementations§
Source§impl PosixWritableFile
impl PosixWritableFile
pub fn flush_buffer(&mut self) -> Status
pub fn write_unbuffered(&mut self, data: *const u8, size: usize) -> Status
pub fn sync_dir_if_manifest(&mut self) -> Status
Sourcepub fn sync_fd(fd: i32, fd_path: &String, syncing_dir: bool) -> Status
pub fn sync_fd(fd: i32, fd_path: &String, syncing_dir: bool) -> Status
| Ensures that all the caches associated with | the given file descriptor’s data are flushed | all the way to durable media, and can | withstand power failures. | | The path argument is only used to populate | the description string in the returned crate::Status | if an error occurs.
Sourcepub fn dirname(filename: &String) -> String
pub fn dirname(filename: &String) -> String
| Returns the directory name in a path pointing | to a file. | | Returns “.” if the path does not contain any | directory separator.
Sourcepub fn basename(filename: &String) -> Slice
pub fn basename(filename: &String) -> Slice
| Extracts the file name from a path pointing | to a file. | | The returned Slice points to |filename|’s | data buffer, so it is only valid while | |filename| is alive and unchanged.
Sourcepub fn is_manifest(filename: &String) -> bool
pub fn is_manifest(filename: &String) -> bool
| True if the given file is a manifest file. |
pub fn new(filename: String, fd: i32) -> Self
Trait Implementations§
Source§impl Drop for PosixWritableFile
impl Drop for PosixWritableFile
Source§impl GetName for PosixWritableFile
impl GetName for PosixWritableFile
Source§impl WritableFileSync for PosixWritableFile
impl WritableFileSync for PosixWritableFile
impl WritableFile for PosixWritableFile
Auto Trait Implementations§
impl Freeze for PosixWritableFile
impl RefUnwindSafe for PosixWritableFile
impl Send for PosixWritableFile
impl Sync for PosixWritableFile
impl Unpin for PosixWritableFile
impl UnwindSafe for PosixWritableFile
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