Skip to main content

Chain

Trait Chain 

Source
pub trait Chain:
    Send
    + Sync
    + 'static {
    // Required methods
    fn serve(
        &self,
        context: &mut Context<'_>,
    ) -> impl Future<Output = Outcome> + Send;
    fn is_empty(&self) -> bool;

    // Provided methods
    fn parallel_query(&self, _query: &Message<'_>) -> Option<Receiver<bool>> { ... }
    fn visit_enabled(&self, _visit: &mut dyn FnMut(&'static str)) { ... }
    fn metrics_enabled(&self) -> bool { ... }
    fn stacktrace(&self) -> bool { ... }
}
Expand description

Statically dispatched Plugin Chain supplied by the Plugin registry.

Required Methods§

Source

fn serve( &self, context: &mut Context<'_>, ) -> impl Future<Output = Outcome> + Send

Source

fn is_empty(&self) -> bool

Provided Methods§

Source

fn parallel_query(&self, _query: &Message<'_>) -> Option<Receiver<bool>>

Source

fn visit_enabled(&self, _visit: &mut dyn FnMut(&'static str))

Source

fn metrics_enabled(&self) -> bool

Source

fn stacktrace(&self) -> bool

Whether contained Plugin panics should include a stacktrace.

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<C: Chain> Chain for Arc<C>

Source§

fn serve( &self, context: &mut Context<'_>, ) -> impl Future<Output = Outcome> + Send

Source§

fn is_empty(&self) -> bool

Source§

fn parallel_query(&self, query: &Message<'_>) -> Option<Receiver<bool>>

Source§

fn visit_enabled(&self, visit: &mut dyn FnMut(&'static str))

Source§

fn metrics_enabled(&self) -> bool

Source§

fn stacktrace(&self) -> bool

Implementors§