diff --git a/iroh-base/src/ticket.rs b/iroh-base/src/ticket.rs index 04e7cbace9..27b0d0bffa 100644 --- a/iroh-base/src/ticket.rs +++ b/iroh-base/src/ticket.rs @@ -7,9 +7,11 @@ mod node; #[cfg(feature = "key")] pub use self::{blob::BlobTicket, node::NodeTicket}; -/// A ticket is a serializable object that combines all information required -/// for an operation. E.g. an iroh blob ticket would contain the hash of the -/// data as well as information about how to reach the provider. +/// A ticket is a serializable object combining information required for an operation. +/// +/// Typically tickets contain all information required for an operation, e.g. an iroh blob +/// ticket would contain the hash of the data as well as information about how to reach the +/// provider. /// /// Tickets support serialization to a string using base32 encoding. The kind of /// ticket will be prepended to the string to make it somewhat self describing. diff --git a/iroh-base/src/ticket/node.rs b/iroh-base/src/ticket/node.rs index b84b4b06f7..8246428fe8 100644 --- a/iroh-base/src/ticket/node.rs +++ b/iroh-base/src/ticket/node.rs @@ -20,7 +20,9 @@ use crate::{ /// 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. +/// 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. /// /// [`NodeId`]: crate::key::NodeId #[derive(Debug, Clone, PartialEq, Eq, derive_more::Display)] diff --git a/iroh-net/src/ticket.rs b/iroh-net/src/ticket.rs index 47fed3ccb5..99f9076759 100644 --- a/iroh-net/src/ticket.rs +++ b/iroh-net/src/ticket.rs @@ -1,2 +1,3 @@ //! Tickets supported by iroh-net pub use iroh_base::ticket::NodeTicket; +pub use iroh_base::ticket::Ticket;