pub struct Topic(/* private fields */);Expand description
Identifier for a gossip- or sync topic.
A topic identifier is required when subscribing or publishing to a stream.
Topics usually describe concrete data which nodes want to exchange over, for example a document id or chat group id and so forth. Applications usually want to share topics via a secure side channel.
WARNING: Sensitive topics have to be treated like secret values and generated using a cryptographically secure pseudorandom number generator (CSPRNG). Otherwise they can be easily guessed by third parties or leaked during discovery.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Topic
impl<'de> Deserialize<'de> for Topic
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 From<VerifyingKey> for Topic
impl From<VerifyingKey> for Topic
Source§fn from(value: VerifyingKey) -> Self
fn from(value: VerifyingKey) -> Self
Converts to this type from the input type.
Source§impl Ord for Topic
impl Ord for Topic
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
Source§impl PartialOrd for Topic
impl PartialOrd for Topic
impl Copy for Topic
impl Eq for Topic
impl StructuralPartialEq for Topic
Auto Trait Implementations§
impl Freeze for Topic
impl RefUnwindSafe for Topic
impl Send for Topic
impl Sync for Topic
impl Unpin for Topic
impl UnsafeUnpin for Topic
impl UnwindSafe for Topic
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