Skip to main content

Files

Trait Files 

Source
pub trait Files<S: Slots>: Sized {
    type Handle: Open + Receive;
    type Changes: Changes<Slots = S>;

Show 15 methods // Required methods fn try_new(layout: S::Layout) -> Result<Self, Error>; fn has_accept_capacity(&self) -> bool; fn establish( &mut self, handle: Self::Handle, ) -> Result<S::Accepted, Self::Handle>; fn close(&mut self, slot: S::Physical) -> File<S::Missing>; fn install( &mut self, slot: S::Owned, handle: Self::Handle, ) -> Result<(), Install<S::Index>>; fn raw(&self, slot: S::Physical) -> Option<RawFd>; fn borrow(&self, slot: S::Physical) -> Option<BorrowedFd<'_>>; fn try_socket( &self, id: <Self::Changes as Changes>::Id, ) -> Result<&Self::Handle, S::Missing>; fn try_read( &mut self, slot: S::Physical, ) -> Result<<Self::Changes as Changes>::Read<'_>, Error<<S as Slots>::Index, <S as Slots>::Missing>>; fn try_write( &mut self, slot: S::Physical, ) -> Result<<Self::Changes as Changes>::Write<'_>, Error<<S as Slots>::Index, <S as Slots>::Missing>>; fn read( &mut self, id: <Self::Changes as Changes>::Id, ) -> Result<Option<<Self::Changes as Changes>::Read<'_>>, Index<S::Index>>; fn write( &mut self, id: <Self::Changes as Changes>::Id, ) -> Result<Option<<Self::Changes as Changes>::Write<'_>>, Index<S::Index>>; fn try_delete( &mut self, entries: impl Iterator<Item = (<Self::Changes as Changes>::Id, Filter)>, ) -> Result<<Self::Changes as Changes>::Deletion<'_>, Index<S::Index>>; fn changes(&self) -> &Self::Changes; fn edit(&mut self) -> &mut Self::Changes;
}

Required Associated Types§

Required Methods§

Source

fn try_new(layout: S::Layout) -> Result<Self, Error>

Source

fn has_accept_capacity(&self) -> bool

Source

fn establish( &mut self, handle: Self::Handle, ) -> Result<S::Accepted, Self::Handle>

Source

fn close(&mut self, slot: S::Physical) -> File<S::Missing>

Source

fn install( &mut self, slot: S::Owned, handle: Self::Handle, ) -> Result<(), Install<S::Index>>

Source

fn raw(&self, slot: S::Physical) -> Option<RawFd>

Source

fn borrow(&self, slot: S::Physical) -> Option<BorrowedFd<'_>>

Source

fn try_socket( &self, id: <Self::Changes as Changes>::Id, ) -> Result<&Self::Handle, S::Missing>

Source

fn try_read( &mut self, slot: S::Physical, ) -> Result<<Self::Changes as Changes>::Read<'_>, Error<<S as Slots>::Index, <S as Slots>::Missing>>

Source

fn try_write( &mut self, slot: S::Physical, ) -> Result<<Self::Changes as Changes>::Write<'_>, Error<<S as Slots>::Index, <S as Slots>::Missing>>

Source

fn read( &mut self, id: <Self::Changes as Changes>::Id, ) -> Result<Option<<Self::Changes as Changes>::Read<'_>>, Index<S::Index>>

Source

fn write( &mut self, id: <Self::Changes as Changes>::Id, ) -> Result<Option<<Self::Changes as Changes>::Write<'_>>, Index<S::Index>>

Source

fn try_delete( &mut self, entries: impl Iterator<Item = (<Self::Changes as Changes>::Id, Filter)>, ) -> Result<<Self::Changes as Changes>::Deletion<'_>, Index<S::Index>>

Source

fn changes(&self) -> &Self::Changes

Source

fn edit(&mut self) -> &mut Self::Changes

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§