Skip to main content

Startup

Trait Startup 

Source
pub trait Startup<Q = Self>: Sized {
    type Error;
    type Target;

    const INTEREST: Interest = register::Interest::Readable;

    // Required method
    fn failed(target: &Self::Target);

    // Provided methods
    fn installed(&self) -> Result<(), Self::Error> { ... }
    fn observed(&self, _request: Requested<Q>) -> ControlFlow<()> { ... }
    fn target(&self) -> Option<&Self::Target> { ... }
}
Expand description

Lifecycle behavior selected by an executor’s shutdown source.

Provided Associated Constants§

Source

const INTEREST: Interest = register::Interest::Readable

Required Associated Types§

Required Methods§

Source

fn failed(target: &Self::Target)

Records installation failure before native cleanup.

Provided Methods§

Source

fn installed(&self) -> Result<(), Self::Error>

Publishes installation readiness or preserves its exact notification failure.

Source

fn observed(&self, _request: Requested<Q>) -> ControlFlow<()>

Observes the registered shutdown source becoming ready.

Source

fn target(&self) -> Option<&Self::Target>

Borrows the existing owner that receives installation failures.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Startup for ()

Source§

type Error = !

Source§

type Target = !

Source§

fn failed(target: &Self::Target)

Source§

impl<Q: Startup> Startup<Q> for (&Q, &Slot<'_>)

Source§

const INTEREST: Interest = Q::INTEREST

Source§

type Error = <Q as Startup>::Error

Source§

type Target = !

Source§

fn observed(&self, request: Requested<Q>) -> ControlFlow<()>

Source§

fn failed(target: &Self::Target)

Implementors§

Source§

impl Startup for &mut Signal<'_>