pub struct FrameMeta<'a> {
pub direction: Direction,
pub transport: Transport,
pub address: &'a str,
pub timestamp: Timestamp,
}Expand description
The transport metadata every level carries: who the peer was, over what, in which direction, and when.
Borrows the address from the frame or message it describes, so it costs no allocation and cannot drift from its source.
Fields§
§direction: DirectionWhether the frame was received or sent.
transport: TransportTransport protocol.
address: &'a strRemote address as recorded in the frame header.
timestamp: TimestampWhen the frame was logged.
Implementations§
Source§impl FrameMeta<'_>
impl FrameMeta<'_>
Sourcepub fn socket_addr(&self) -> Option<SocketAddr>
pub fn socket_addr(&self) -> Option<SocketAddr>
The remote address as a typed SocketAddr, preserving family and
port. None when the recorded address is not ip:port; the raw string
remains in address.
Trait Implementations§
impl<'a> Copy for FrameMeta<'a>
impl<'a> Eq for FrameMeta<'a>
impl<'a> StructuralPartialEq for FrameMeta<'a>
Auto Trait Implementations§
impl<'a> Freeze for FrameMeta<'a>
impl<'a> RefUnwindSafe for FrameMeta<'a>
impl<'a> Send for FrameMeta<'a>
impl<'a> Sync for FrameMeta<'a>
impl<'a> Unpin for FrameMeta<'a>
impl<'a> UnsafeUnpin for FrameMeta<'a>
impl<'a> UnwindSafe for FrameMeta<'a>
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