Skip to main content

Cleanup

Trait Cleanup 

Source
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§

Source

type Primary: Copy

Source

type Ring: Owner<File = Self::File>

Source

type File: Occupied

Source

type Accept: Accept<Ring = Self::Ring, File = Self::File>

Source

type Session: Empty<Ring = Self::Ring>

Source

type Error

Required Methods§

Source

fn raw(ring: Self::Ring, primary: Self::Primary) -> Result<Self::Primary, Self>

Source

fn file( ring: Self::Ring, primary: Self::Primary, file: Self::File, ) -> Result<Self::Primary, Self>

Source

fn accept( state: Self::Accept, primary: Self::Primary, file: Self::File, ) -> Result<Self::Primary, Self>

Source

fn session( state: Self::Session, primary: Self::Primary, ) -> Result<Self::Primary, Self>

Source

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>

Source

fn socket( state: <<Self as Cleanup>::Session as Empty>::Direct, primary: Self::Primary, ) -> Result<Self::Primary, Self>

Source

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>

Source

fn primary(&self) -> Self::Primary

Source

fn failure(&self) -> Self::Error

Source

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".

Implementors§