pub enum Address {
All,
Local {
node: String,
},
Engineer {
email: String,
},
Session {
id: String,
node: Option<String>,
},
}Expand description
Whom a message is for, as its to says it (parse; Display writes it back).
Variants§
All
Every session of the collective on every member’s machine: all, as collective or all on
the command line.
Local
The sessions of one node, local@<node>: local on the command line, for this node. It counts
only on a line of that node (Message::well_formed), and it never travels (Message::stays_here).
Engineer
engineer, or engineer:<email>; email is empty for the former.
Session
<session>@<node>. A line written without the node (by hand) reaches that session on any node;
address never writes one.
Implementations§
Source§impl Address
impl Address
Sourcepub fn parse(s: &str) -> Option<Address>
pub fn parse(s: &str) -> Option<Address>
The address s names: a token, with neither its session nor its node empty.
Sourcepub fn reaches(&self, here: &str, session: &str) -> bool
pub fn reaches(&self, here: &str, session: &str) -> bool
Whether it names session of the node here (a broadcast is not checked here: applies).
Trait Implementations§
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Address
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.