pub trait Cleanup: Sized {
type Primary: Copy;
type Ring: Owner<File = Self::File>;
type File: Occupied;
type Accept: Accept<Ring = Self::Ring, File = Self::File>;
type Session: Empty<Ring = Self::Ring>;
type Error;
// Required methods
fn raw(
ring: Self::Ring,
primary: Self::Primary,
) -> Result<Self::Primary, Self>;
fn file(
ring: Self::Ring,
primary: Self::Primary,
file: Self::File,
) -> Result<Self::Primary, Self>;
fn accept(
state: Self::Accept,
primary: Self::Primary,
file: Self::File,
) -> Result<Self::Primary, Self>;
fn session(
state: Self::Session,
primary: Self::Primary,
) -> Result<Self::Primary, Self>;
fn receive(
state: State<<<Self as Cleanup>::Session as Empty>::Occupied, <<<Self as Cleanup>::Session as Empty>::Occupied as Session>::Pending>,
primary: Self::Primary,
) -> Result<Self::Primary, Self>;
fn socket(
state: <<Self as Cleanup>::Session as Empty>::Direct,
primary: Self::Primary,
) -> Result<Self::Primary, Self>;
fn option(
state: State<<<Self as Cleanup>::Session as Empty>::Direct, <<<Self as Cleanup>::Session as Empty>::Direct as Session>::Pending>,
primary: Self::Primary,
) -> Result<Self::Primary, Self>;
fn primary(&self) -> Self::Primary;
fn failure(&self) -> Self::Error;
fn try_close(
self,
report: impl FnMut(Self::Error),
) -> Result<Self::Primary, Self>;
}Expand description
Failed probe cleanup retains every kernel borrow until it can close safely.
Required Associated Types§
type Primary: Copy
type Ring: Owner<File = Self::File>
type File: Occupied
type Accept: Accept<Ring = Self::Ring, File = Self::File>
type Session: Empty<Ring = Self::Ring>
type Error
Required Methods§
fn raw(ring: Self::Ring, primary: Self::Primary) -> Result<Self::Primary, Self>
fn file( ring: Self::Ring, primary: Self::Primary, file: Self::File, ) -> Result<Self::Primary, Self>
fn accept( state: Self::Accept, primary: Self::Primary, file: Self::File, ) -> Result<Self::Primary, Self>
fn session( state: Self::Session, primary: Self::Primary, ) -> Result<Self::Primary, Self>
fn receive( state: State<<<Self as Cleanup>::Session as Empty>::Occupied, <<<Self as Cleanup>::Session as Empty>::Occupied as Session>::Pending>, primary: Self::Primary, ) -> Result<Self::Primary, Self>
fn socket( state: <<Self as Cleanup>::Session as Empty>::Direct, primary: Self::Primary, ) -> Result<Self::Primary, Self>
fn option( state: State<<<Self as Cleanup>::Session as Empty>::Direct, <<<Self as Cleanup>::Session as Empty>::Direct as Session>::Pending>, primary: Self::Primary, ) -> Result<Self::Primary, Self>
fn primary(&self) -> Self::Primary
fn failure(&self) -> Self::Error
fn try_close( self, report: impl FnMut(Self::Error), ) -> Result<Self::Primary, Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".