Struct libp2p_pubsub_core::Message
source · pub struct Message {
pub from: Option<PeerId>,
pub data: Vec<u8>,
pub sequence_number: Option<Bytes>,
pub topic: TopicHash,
pub signature: Option<Vec<u8>>,
pub key: Option<Vec<u8>>,
}
Expand description
A pubsub message.
Fields§
§from: Option<PeerId>
The author of this message.
data: Vec<u8>
The data of this message.
sequence_number: Option<Bytes>
The sequence number of this message.
topic: TopicHash
The topic this message is published to.
signature: Option<Vec<u8>>
The signature of this message.
key: Option<Vec<u8>>
The key of this message.
Implementations§
Trait Implementations§
source§impl From<Message> for Message
impl From<Message> for Message
source§fn from(message: FrameMessage) -> Self
fn from(message: FrameMessage) -> Self
Converts to this type from the input type.
source§impl PartialEq<Message> for Message
impl PartialEq<Message> for Message
impl Eq for Message
impl StructuralEq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more