Struct file_system::file::File[][src]

pub struct File {
    inner: File,
    limiter: Option<Arc<IORateLimiter>>,
}

A wrapper around std::fs::File with capability to track and regulate IO flow.

Fields

inner: Filelimiter: Option<Arc<IORateLimiter>>

Implementations

impl File[src]

pub fn open<P: AsRef<Path>>(path: P) -> Result<File>[src]

pub fn create<P: AsRef<Path>>(path: P) -> Result<File>[src]

pub fn from_raw_file(file: File) -> Result<File>[src]

pub fn sync_all(&self) -> Result<()>[src]

pub fn sync_data(&self) -> Result<()>[src]

pub fn set_len(&self, size: u64) -> Result<()>[src]

pub fn metadata(&self) -> Result<Metadata>[src]

pub fn try_clone(&self) -> Result<File>[src]

pub fn set_permissions(&self, perm: Permissions) -> Result<()>[src]

impl File[src]

fs2::FileExt

pub fn duplicate(&self) -> Result<File>[src]

pub fn allocated_size(&self) -> Result<u64>[src]

pub fn allocate(&self, len: u64) -> Result<()>[src]

pub fn lock_shared(&self) -> Result<()>[src]

pub fn lock_exclusive(&self) -> Result<()>[src]

pub fn try_lock_shared(&self) -> Result<()>[src]

pub fn try_lock_exclusive(&self) -> Result<()>[src]

pub fn unlock(&self) -> Result<()>[src]

Trait Implementations

impl Debug for File[src]

impl Read for File[src]

impl Seek for File[src]

impl Write for File[src]

Auto Trait Implementations

impl RefUnwindSafe for File

impl Send for File

impl Sync for File

impl Unpin for File

impl UnwindSafe for File

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<R> ReadBytesExt for R where
    R: Read + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<W> WriteBytesExt for W where
    W: Write + ?Sized
[src]