pub trait File: Send + Sync {
// Required methods
fn lock_file(&self, exclusive: bool) -> Result<()>;
fn unlock_file(&self) -> Result<()>;
fn pread(&self, pos: usize, c: Arc<Completion>) -> Result<()>;
fn pwrite(
&self,
pos: usize,
buffer: Arc<RefCell<Buffer>>,
c: Arc<Completion>,
) -> Result<()>;
fn sync(&self, c: Arc<Completion>) -> Result<()>;
fn size(&self) -> Result<u64>;
fn truncate(&self, len: usize, c: Arc<Completion>) -> Result<()>;
}Required Methods§
fn lock_file(&self, exclusive: bool) -> Result<()>
fn unlock_file(&self) -> Result<()>
fn pread(&self, pos: usize, c: Arc<Completion>) -> Result<()>
fn pwrite( &self, pos: usize, buffer: Arc<RefCell<Buffer>>, c: Arc<Completion>, ) -> Result<()>
fn sync(&self, c: Arc<Completion>) -> Result<()>
fn size(&self) -> Result<u64>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".