pub struct MailAddress {
pub machine: String,
pub harness: String,
pub session_id: String,
}Expand description
Where one session can be reached: sc:<machine>:<harness>:<session-id>.
Addresses name a harness-native session id, not a process or socket, so
they survive the owning process restarting. They do not survive a new
session id (Claude /clear, a fork); a send to such an address is refused
as stale rather than guessed.
Fields§
§machine: StringMachine the session runs on.
harness: StringHarness id (claude-code, codex, …).
session_id: StringHarness-native session id.
Implementations§
Source§impl MailAddress
impl MailAddress
Sourcepub fn new(
machine: impl Into<String>,
harness: impl Into<String>,
session_id: impl Into<String>,
) -> Result<Self, MailAddressError>
pub fn new( machine: impl Into<String>, harness: impl Into<String>, session_id: impl Into<String>, ) -> Result<Self, MailAddressError>
Build an address, validating each part.
Sourcepub fn parse(value: &str) -> Result<Self, MailAddressError>
pub fn parse(value: &str) -> Result<Self, MailAddressError>
Parse sc:<machine>:<harness>:<session-id>. The session id is the
remainder, so an id that itself contains : still parses.
Trait Implementations§
Source§impl Clone for MailAddress
impl Clone for MailAddress
Source§impl Debug for MailAddress
impl Debug for MailAddress
Source§impl<'de> Deserialize<'de> for MailAddress
impl<'de> Deserialize<'de> for MailAddress
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MailAddress
impl Display for MailAddress
impl Eq for MailAddress
Source§impl From<MailAddress> for String
impl From<MailAddress> for String
Source§fn from(value: MailAddress) -> Self
fn from(value: MailAddress) -> Self
Converts to this type from the input type.
Source§impl Hash for MailAddress
impl Hash for MailAddress
Source§impl Ord for MailAddress
impl Ord for MailAddress
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MailAddress
impl PartialEq for MailAddress
Source§impl PartialOrd for MailAddress
impl PartialOrd for MailAddress
Source§impl Serialize for MailAddress
impl Serialize for MailAddress
impl StructuralPartialEq for MailAddress
Auto Trait Implementations§
impl Freeze for MailAddress
impl RefUnwindSafe for MailAddress
impl Send for MailAddress
impl Sync for MailAddress
impl Unpin for MailAddress
impl UnsafeUnpin for MailAddress
impl UnwindSafe for MailAddress
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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.