pub struct RoutingContext { /* private fields */ }Expand description
Message network transmission metadata
Contains metadata generated during network transmission, such as client address, timestamp, and system flags.
Implementations§
Source§impl RoutingContext
impl RoutingContext
Sourcepub fn new(born_host: SocketAddr, born_timestamp: i64, sys_flag: i32) -> Self
pub fn new(born_host: SocketAddr, born_timestamp: i64, sys_flag: i32) -> Self
Creates a new routing context
Sourcepub fn born_host(&self) -> SocketAddr
pub fn born_host(&self) -> SocketAddr
Gets the message sender’s client address
Sourcepub fn born_timestamp(&self) -> i64
pub fn born_timestamp(&self) -> i64
Gets the message creation timestamp
Sourcepub fn with_born_host_v6_flag(&mut self)
pub fn with_born_host_v6_flag(&mut self)
Sets the IPv6 flag for born_host
Sourcepub fn born_host_bytes(&self) -> Bytes
pub fn born_host_bytes(&self) -> Bytes
Serializes born_host to bytes
Trait Implementations§
Source§impl Clone for RoutingContext
impl Clone for RoutingContext
Source§impl Debug for RoutingContext
impl Debug for RoutingContext
Source§impl Default for RoutingContext
impl Default for RoutingContext
impl Eq for RoutingContext
Source§impl PartialEq for RoutingContext
impl PartialEq for RoutingContext
impl StructuralPartialEq for RoutingContext
Auto Trait Implementations§
impl Freeze for RoutingContext
impl RefUnwindSafe for RoutingContext
impl Send for RoutingContext
impl Sync for RoutingContext
impl Unpin for RoutingContext
impl UnsafeUnpin for RoutingContext
impl UnwindSafe for RoutingContext
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