pub struct MessageChannel { /* private fields */ }Expand description
Message channel for sending and receiving cloud events.
Implementations§
Source§impl MessageChannel
impl MessageChannel
Returns a reference to the shared MessageChannel.
Sourcepub fn try_send(
&self,
message: impl Into<CloudEvent>,
) -> Result<(), TrySendError<CloudEvent>>
pub fn try_send( &self, message: impl Into<CloudEvent>, ) -> Result<(), TrySendError<CloudEvent>>
Attempts to send a message to all receivers in the channel except this one.
Sourcepub fn into_stream(self) -> impl Stream<Item = CloudEvent>
pub fn into_stream(self) -> impl Stream<Item = CloudEvent>
Consumes Self and returns a message stream of CloudEvent.
Trait Implementations§
Source§impl Debug for MessageChannel
impl Debug for MessageChannel
Auto Trait Implementations§
impl Freeze for MessageChannel
impl RefUnwindSafe for MessageChannel
impl Send for MessageChannel
impl Sync for MessageChannel
impl Unpin for MessageChannel
impl UnwindSafe for MessageChannel
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 more