#[non_exhaustive]pub struct RoutingMetadata {
pub source: Option<EndpointAddress>,
pub destination: Option<EndpointAddress>,
pub reply_to: Option<EndpointAddress>,
}Expand description
Transport-independent routing only. Kafka partition keys, RabbitMQ exchanges and NATS
subject options are transport concepts and must never appear here — a transport crate derives
its own wire-level routing from Self::destination instead, without adding its concept to
this struct.
use reliar_core::{EndpointAddress, Metadata};
let mut metadata = Metadata::default();
metadata.routing.destination = Some(EndpointAddress::parse("orders-service")?);
assert_eq!(metadata.routing.destination.unwrap().as_str(), "orders-service");Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source: Option<EndpointAddress>The logical origin of this message.
destination: Option<EndpointAddress>The logical destination of this message.
reply_to: Option<EndpointAddress>Where a reply to this message should be sent.
Trait Implementations§
Source§impl Clone for RoutingMetadata
impl Clone for RoutingMetadata
Source§fn clone(&self) -> RoutingMetadata
fn clone(&self) -> RoutingMetadata
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 RoutingMetadata
impl Debug for RoutingMetadata
Source§impl Default for RoutingMetadata
impl Default for RoutingMetadata
Source§fn default() -> RoutingMetadata
fn default() -> RoutingMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RoutingMetadata
Available on crate feature serde only.
impl<'de> Deserialize<'de> for RoutingMetadata
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RoutingMetadata
Source§impl PartialEq for RoutingMetadata
impl PartialEq for RoutingMetadata
Source§impl Serialize for RoutingMetadata
Available on crate feature serde only.
impl Serialize for RoutingMetadata
Available on crate feature
serde only.impl StructuralPartialEq for RoutingMetadata
Auto Trait Implementations§
impl Freeze for RoutingMetadata
impl RefUnwindSafe for RoutingMetadata
impl Send for RoutingMetadata
impl Sync for RoutingMetadata
impl Unpin for RoutingMetadata
impl UnsafeUnpin for RoutingMetadata
impl UnwindSafe for RoutingMetadata
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