pub struct MessageRoute { /* private fields */ }Expand description
Static routing metadata carried alongside a message payload.
Implementations§
Source§impl MessageRoute
impl MessageRoute
Sourcepub const fn new(
source: Option<MessageEndpoint>,
target: MessageEndpoint,
) -> Self
pub const fn new( source: Option<MessageEndpoint>, target: MessageEndpoint, ) -> Self
Create routing metadata from an optional source to a required target.
Sourcepub const fn source(&self) -> Option<&MessageEndpoint>
pub const fn source(&self) -> Option<&MessageEndpoint>
Upstream source endpoint, absent for externally injected messages.
Sourcepub const fn target(&self) -> &MessageEndpoint
pub const fn target(&self) -> &MessageEndpoint
Downstream target endpoint.
Trait Implementations§
Source§impl Clone for MessageRoute
impl Clone for MessageRoute
Source§fn clone(&self) -> MessageRoute
fn clone(&self) -> MessageRoute
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageRoute
impl Debug for MessageRoute
Source§impl PartialEq for MessageRoute
impl PartialEq for MessageRoute
Source§fn eq(&self, other: &MessageRoute) -> bool
fn eq(&self, other: &MessageRoute) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MessageRoute
impl StructuralPartialEq for MessageRoute
Auto Trait Implementations§
impl Freeze for MessageRoute
impl RefUnwindSafe for MessageRoute
impl Send for MessageRoute
impl Sync for MessageRoute
impl Unpin for MessageRoute
impl UnsafeUnpin for MessageRoute
impl UnwindSafe for MessageRoute
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).