pub struct RoutingMessage { /* private fields */ }Expand description
Owned, supervisor-marshalled view of a message a routing function evaluates.
Implementations§
Source§impl RoutingMessage
impl RoutingMessage
Sourcepub fn with(self, field: impl Into<String>, value: FieldValue) -> Self
pub fn with(self, field: impl Into<String>, value: FieldValue) -> Self
Adds or replaces a field, returning the updated message.
Sourcepub fn get(&self, field: &str) -> Option<&FieldValue>
pub fn get(&self, field: &str) -> Option<&FieldValue>
Returns the value of field, if present.
Sourcepub fn fields(&self) -> impl Iterator<Item = (&str, &FieldValue)>
pub fn fields(&self) -> impl Iterator<Item = (&str, &FieldValue)>
Iterates the message’s fields in deterministic (key-sorted) order.
Trait Implementations§
Source§impl Clone for RoutingMessage
impl Clone for RoutingMessage
Source§fn clone(&self) -> RoutingMessage
fn clone(&self) -> RoutingMessage
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 RoutingMessage
impl Debug for RoutingMessage
Source§impl Default for RoutingMessage
impl Default for RoutingMessage
Source§fn default() -> RoutingMessage
fn default() -> RoutingMessage
Returns the “default value” for a type. Read more
Source§impl PartialEq for RoutingMessage
impl PartialEq for RoutingMessage
Source§fn eq(&self, other: &RoutingMessage) -> bool
fn eq(&self, other: &RoutingMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RoutingMessage
Auto Trait Implementations§
impl Freeze for RoutingMessage
impl RefUnwindSafe for RoutingMessage
impl Send for RoutingMessage
impl Sync for RoutingMessage
impl Unpin for RoutingMessage
impl UnsafeUnpin for RoutingMessage
impl UnwindSafe for RoutingMessage
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