pub struct MultiHandler { /* private fields */ }Expand description
A handler that dispatches to multiple handlers.
Implementations§
Source§impl MultiHandler
impl MultiHandler
Sourcepub fn add<H: StreamHandler + 'static>(self, handler: H) -> Self
pub fn add<H: StreamHandler + 'static>(self, handler: H) -> Self
Add a handler.
Sourcepub fn add_boxed(self, handler: Box<dyn StreamHandler>) -> Self
pub fn add_boxed(self, handler: Box<dyn StreamHandler>) -> Self
Add a boxed handler.
Trait Implementations§
Source§impl Default for MultiHandler
impl Default for MultiHandler
Source§impl StreamHandler for MultiHandler
impl StreamHandler for MultiHandler
Source§fn handle(&self, message: &StreamMessage)
fn handle(&self, message: &StreamMessage)
Process a stream message.
Source§fn should_handle(&self, _message: &StreamMessage) -> bool
fn should_handle(&self, _message: &StreamMessage) -> bool
Filter predicate - return false to skip handling this message.
Auto Trait Implementations§
impl Freeze for MultiHandler
impl !RefUnwindSafe for MultiHandler
impl Send for MultiHandler
impl Sync for MultiHandler
impl Unpin for MultiHandler
impl !UnwindSafe for MultiHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request