Struct ockam::pipe::PipeBehavior
source · [−]pub struct PipeBehavior { /* private fields */ }
Expand description
Structure to combine a set of pipe BehaviorHooks
Implementations
sourceimpl PipeBehavior
impl PipeBehavior
pub fn with<T: BehaviorHook + Send + Sync + 'static>(t: T) -> Self
pub fn empty() -> Self
sourcepub fn attach<T: BehaviorHook + Send + Sync + 'static>(self, t: T) -> Self
pub fn attach<T: BehaviorHook + Send + Sync + 'static>(self, t: T) -> Self
Attach a new BehaviorHook in a chainable manner
sourcepub fn insert<T: BehaviorHook + Send + Sync + 'static>(&mut self, t: T)
pub fn insert<T: BehaviorHook + Send + Sync + 'static>(&mut self, t: T)
Insert a new BehaviorHook in place
sourcepub async fn external_all(
&mut self,
this: Address,
peer: Route,
ctx: &mut Context,
msg: &PipeMessage
) -> Result<PipeModifier>
pub async fn external_all(
&mut self,
this: Address,
peer: Route,
ctx: &mut Context,
msg: &PipeMessage
) -> Result<PipeModifier>
Run all external message hooks associated with this pipe
sourcepub async fn internal_all(
&mut self,
this: Address,
peer: Route,
ctx: &mut Context,
msg: &InternalCmd
) -> Result<()>
pub async fn internal_all(
&mut self,
this: Address,
peer: Route,
ctx: &mut Context,
msg: &InternalCmd
) -> Result<()>
Run all internal message hooks associated with this pipe
Trait Implementations
sourceimpl Clone for PipeBehavior
impl Clone for PipeBehavior
sourceimpl<T: BehaviorHook + Send + Sync + 'static> From<T> for PipeBehavior
impl<T: BehaviorHook + Send + Sync + 'static> From<T> for PipeBehavior
Auto Trait Implementations
impl !RefUnwindSafe for PipeBehavior
impl Send for PipeBehavior
impl Sync for PipeBehavior
impl Unpin for PipeBehavior
impl !UnwindSafe for PipeBehavior
Blanket Implementations
sourceimpl<D> AsyncTryClone for D where
D: Clone + Sync,
impl<D> AsyncTryClone for D where
D: Clone + Sync,
sourcefn async_try_clone<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<D, Error>> + Send + 'async_trait, Global>>ⓘ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,
D: 'async_trait,
fn async_try_clone<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<D, Error>> + Send + 'async_trait, Global>>ⓘ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,
D: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Try cloning a object and return an Err
in case of failure.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more