#[non_exhaustive]pub struct SessionMeta {
pub direction: Direction,
pub path: Path,
pub remote: SocketAddr,
}Expand description
The facts about a session observe needs in order to decide whether to answer it.
#[non_exhaustive]: an additive field is a patch release for consumers, who construct this via
SessionMeta::new rather than a struct literal (SPEC.md §12).
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.direction: DirectionWhich side accepted the connection.
path: PathWhether the connection is direct or relayed.
remote: SocketAddrThe remote address this node observed the connection arrive from.
Implementations§
Source§impl SessionMeta
impl SessionMeta
Sourcepub fn new(direction: Direction, path: Path, remote: SocketAddr) -> Self
pub fn new(direction: Direction, path: Path, remote: SocketAddr) -> Self
Construct a SessionMeta from its three facts.
Trait Implementations§
Source§impl Clone for SessionMeta
impl Clone for SessionMeta
Source§fn clone(&self) -> SessionMeta
fn clone(&self) -> SessionMeta
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 moreimpl Copy for SessionMeta
Auto Trait Implementations§
impl Freeze for SessionMeta
impl RefUnwindSafe for SessionMeta
impl Send for SessionMeta
impl Sync for SessionMeta
impl Unpin for SessionMeta
impl UnsafeUnpin for SessionMeta
impl UnwindSafe for SessionMeta
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