pub struct RoomTicket { /* private fields */ }Expand description
A room: its gossip topic and the peers to contact first.
Its string form is an iroh_tickets ticket of kind room2. The kind
names the version of the room’s gossip messages, which carry no version of
their own, so a ticket of an earlier format fails to parse instead of
joining a room whose messages its peers cannot read.
Implementations§
Source§impl RoomTicket
impl RoomTicket
Sourcepub fn new(
topic_id: TopicId,
bootstrap: impl IntoIterator<Item = EndpointId>,
) -> Self
pub fn new( topic_id: TopicId, bootstrap: impl IntoIterator<Item = EndpointId>, ) -> Self
Creates a ticket for topic_id, bootstrapping from bootstrap.
Sourcepub fn bootstrap(&self) -> &[EndpointId] ⓘ
pub fn bootstrap(&self) -> &[EndpointId] ⓘ
Returns the peers a joiner contacts first.
Trait Implementations§
Source§impl Clone for RoomTicket
impl Clone for RoomTicket
Source§impl Debug for RoomTicket
impl Debug for RoomTicket
Source§impl<'de> Deserialize<'de> for RoomTicket
impl<'de> Deserialize<'de> for RoomTicket
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 RoomTicket
impl Display for RoomTicket
impl Eq for RoomTicket
Source§impl FromStr for RoomTicket
impl FromStr for RoomTicket
Source§impl PartialEq for RoomTicket
impl PartialEq for RoomTicket
Source§impl Serialize for RoomTicket
impl Serialize for RoomTicket
impl StructuralPartialEq for RoomTicket
Source§impl Ticket for RoomTicket
impl Ticket for RoomTicket
Source§const KIND: &'static str = "room2"
const KIND: &'static str = "room2"
Bumped from room when the gossip announcements changed format.
Source§fn decode_bytes(bytes: &[u8]) -> Result<Self, ParseError>
fn decode_bytes(bytes: &[u8]) -> Result<Self, ParseError>
Decode a ticket from its byte representation.
Source§fn encode_string(&self) -> String
fn encode_string(&self) -> String
Encode the ticket into its canonical string form. Read more
Source§fn decode_string(s: &str) -> Result<Self, ParseError>
fn decode_string(s: &str) -> Result<Self, ParseError>
Decode a ticket from its canonical string form. Read more
Auto Trait Implementations§
impl Freeze for RoomTicket
impl RefUnwindSafe for RoomTicket
impl Send for RoomTicket
impl Sync for RoomTicket
impl Unpin for RoomTicket
impl UnsafeUnpin for RoomTicket
impl UnwindSafe for RoomTicket
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
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,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.