pub struct NodeTicket { /* private fields */ }
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: D,
) -> Result<NodeTicket, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<NodeTicket, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
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§fn from(addr: NodeAddr) -> NodeTicket
fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
Source§impl From<NodeTicket> for NodeAddr
impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
fn from(ticket: NodeTicket) -> NodeAddr
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§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Ticket for NodeTicket
impl Ticket for NodeTicket
Source§fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>
fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>
Deserialize from the base32 string representation bytes.
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.