pub trait BehaviorHook: DynClone + Send {
    fn on_external<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        this: Address,
        peer: Route,
        ctx: &'life1 mut Context,
        msg: &'life2 PipeMessage
    ) -> Pin<Box<dyn Future<Output = Result<PipeModifier>> + Send + 'async_trait>>Notable traits for Pin<P>impl<P> Future for Pin<P> where
    P: DerefMut,
    <P as Deref>::Target: Future
type Output = <<P as Deref>::Target as Future>::Output;

    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; fn on_internal<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        this: Address,
        peer: Route,
        ctx: &'life1 mut Context,
        msg: &'life2 InternalCmd
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>Notable traits for Pin<P>impl<P> Future for Pin<P> where
    P: DerefMut,
    <P as Deref>::Target: Future
type Output = <<P as Deref>::Target as Future>::Output;

    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }
Expand description

Define the behavior of a pipe

Required Methods

This function MUST be run for every incoming user message

  • Access to mutable self
  • Access to own internal address
  • Access to peer internal route
  • Access to mutable context
  • Access to incoming or outgoing PipeMessage

This function MUST be run for every incoming internal message

An internal message is one sent to the private API address of this worker to issue commands, such as re-sending payloads

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Implementors