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§
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".