Skip to main content

Retain

Trait Retain 

Source
pub trait Retain<P>: Cleanup<P> {
    type Build: Build<P, Context = Self::Context, Cleanup = Self>;
    type Ring;
    type Probe;
    type Canary;
    type Context: Context<Cleanup = Self::Buffers>;
    type Buffers: Cleanup<Context = Self::Context>;
    type Producer;
    type Registration;
    type Registered;
    type BufferError;

    // Required methods
    fn probe(state: Self::Probe) -> Self;
    fn open<F: Failure<Cleanup = Self::Buffers>>(
        ring: Self::Ring,
        fault: F,
    ) -> Self::Build;
    fn canary(
        ring: Self::Ring,
        primary: P,
        buffers: Self::Canary,
    ) -> Result<P, Self>;
    fn unmap(ring: Self::Ring, primary: P, buffers: Self::Buffers) -> Self;
    fn registration(
        state: Self::Registration,
        buffers: Self::Producer,
    ) -> Self::Build;
    fn provided(
        cause: Self::BufferError,
        ring: Self::Registered,
        buffers: Self::Producer,
    ) -> Self::Build;
}
Expand description

Retains all ring and payload owners while construction cleanup is incomplete.

Required Associated Types§

Source

type Build: Build<P, Context = Self::Context, Cleanup = Self>

Source

type Ring

Source

type Probe

Source

type Canary

Source

type Context: Context<Cleanup = Self::Buffers>

Source

type Buffers: Cleanup<Context = Self::Context>

Source

type Producer

Source

type Registration

Source

type Registered

Source

type BufferError

Required Methods§

Source

fn probe(state: Self::Probe) -> Self

Source

fn open<F: Failure<Cleanup = Self::Buffers>>( ring: Self::Ring, fault: F, ) -> Self::Build

Source

fn canary( ring: Self::Ring, primary: P, buffers: Self::Canary, ) -> Result<P, Self>

Source

fn unmap(ring: Self::Ring, primary: P, buffers: Self::Buffers) -> Self

Source

fn registration( state: Self::Registration, buffers: Self::Producer, ) -> Self::Build

Source

fn provided( cause: Self::BufferError, ring: Self::Registered, buffers: Self::Producer, ) -> Self::Build

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§