pub struct NodeTicket { /* private fields */ }
Available on crate features
key
and base32
only.Expand description
A token containing information for establishing a connection to a node.
Contains
- The
NodeId
of the node to connect to (a 32-byte ed25519 public key). - If used, the [’RelayUrl`] of on which the node can be reached.
- Any direct addresses on which the node might be reachable.
This allows establishing a connection to the node in most circumstances where it is possible to do so.
This NodeTicket
is a single item which can be easily serialized and deserialized and
implements the Ticket
trait. The Display
and FromStr
traits can also be
used to round-trip the ticket to string.
Implementations§
Trait Implementations§
Source§impl Clone for NodeTicket
impl Clone for NodeTicket
Source§fn clone(&self) -> NodeTicket
fn clone(&self) -> NodeTicket
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NodeTicket
impl Debug for NodeTicket
Source§impl<'de> Deserialize<'de> for NodeTicket
impl<'de> Deserialize<'de> for NodeTicket
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for NodeTicket
impl Display for NodeTicket
Source§impl From<NodeAddr> for NodeTicket
impl From<NodeAddr> for NodeTicket
Source§impl From<NodeTicket> for NodeAddr
impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> Self
fn from(ticket: NodeTicket) -> Self
Returns the addressing info from given ticket.
Source§impl FromStr for NodeTicket
impl FromStr for NodeTicket
Source§impl PartialEq for NodeTicket
impl PartialEq for NodeTicket
Source§impl Serialize for NodeTicket
impl Serialize for NodeTicket
Source§impl Ticket for NodeTicket
impl Ticket for NodeTicket
impl Eq for NodeTicket
impl StructuralPartialEq for NodeTicket
Auto Trait Implementations§
impl Freeze for NodeTicket
impl RefUnwindSafe for NodeTicket
impl Send for NodeTicket
impl Sync for NodeTicket
impl Unpin for NodeTicket
impl UnwindSafe for NodeTicket
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