pub struct NativeFile { /* private fields */ }Expand description
One file owned by the native I/O runtime.
Callers retain responsibility for capability-safe path resolution and pass the resulting handle here exactly once.
Implementations§
Source§impl NativeFile
impl NativeFile
Sourcepub const fn from_file(file: File) -> Self
pub const fn from_file(file: File) -> Self
Transfers ownership of an already-authorized file handle to the runtime.
Sourcepub const fn as_file(&self) -> &File ⓘ
pub const fn as_file(&self) -> &File ⓘ
Borrows the underlying handle for platform-specific control operations.
Sourcepub fn write_all_batch_async(
&self,
writes: Vec<OwnedWrite>,
) -> Result<WriteBatch>
pub fn write_all_batch_async( &self, writes: Vec<OwnedWrite>, ) -> Result<WriteBatch>
Submits owned writes while retaining this handle for later operations.
Sourcepub fn sync(&self, durability: Durability) -> Result<()>
pub fn sync(&self, durability: Durability) -> Result<()>
Flushes file contents and metadata according to durability.
Auto Trait Implementations§
impl Freeze for NativeFile
impl RefUnwindSafe for NativeFile
impl Send for NativeFile
impl Sync for NativeFile
impl Unpin for NativeFile
impl UnsafeUnpin for NativeFile
impl UnwindSafe for NativeFile
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