pub struct TruncateFile<S: AsFd> { /* private fields */ }Available on Unix only.
Expand description
Truncates or extends the underlying file, updating the size of this file to
become size.
Implementations§
Source§impl<S: AsFd> TruncateFile<S>
impl<S: AsFd> TruncateFile<S>
Sourcepub fn new(fd: S, size: u64) -> Self
pub fn new(fd: S, size: u64) -> Self
Create TruncateFile.
Trait Implementations§
Source§impl<S: AsFd> OpCode for TruncateFile<S>
impl<S: AsFd> OpCode for TruncateFile<S>
Source§fn pre_submit(self: Pin<&mut Self>) -> Result<Decision>
fn pre_submit(self: Pin<&mut Self>) -> Result<Decision>
Perform the operation before submit, and return
Decision to
indicate whether submitting the operation to polling is required.Source§impl<S: AsFd> OpCode for TruncateFile<S>
impl<S: AsFd> OpCode for TruncateFile<S>
Source§fn create_entry(self: Pin<&mut Self>) -> OpEntry
fn create_entry(self: Pin<&mut Self>) -> OpEntry
Create submission entry.
Source§fn call_blocking(self: Pin<&mut Self>) -> Result<usize>
fn call_blocking(self: Pin<&mut Self>) -> Result<usize>
Call the operation in a blocking way. This method will only be called if
create_entry returns OpEntry::Blocking.Auto Trait Implementations§
impl<S> Freeze for TruncateFile<S>where
S: Freeze,
impl<S> RefUnwindSafe for TruncateFile<S>where
S: RefUnwindSafe,
impl<S> Send for TruncateFile<S>where
S: Send,
impl<S> Sync for TruncateFile<S>where
S: Sync,
impl<S> Unpin for TruncateFile<S>where
S: Unpin,
impl<S> UnwindSafe for TruncateFile<S>where
S: UnwindSafe,
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