pub struct Route {
pub key: String,
pub session: Option<String>,
}Expand description
An inbox address: a base64 identity key, optionally scoped to a session.
Keys are base64 and session ids are hex, so neither contains # — the single
separator is unambiguous.
Fields§
§key: String§session: Option<String>Implementations§
Source§impl Route
impl Route
Sourcepub fn new(key: impl Into<String>, session: impl Into<String>) -> Self
pub fn new(key: impl Into<String>, session: impl Into<String>) -> Self
A session-scoped route. An empty session collapses to a bare-key route, so
a legacy/sessionless announcement round-trips to key.
Trait Implementations§
impl Eq for Route
impl StructuralPartialEq for Route
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
impl UnwindSafe for Route
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.