Struct libp2p::gossipsub::GossipsubMessage
source · [−]pub struct GossipsubMessage {
pub source: Option<PeerId>,
pub data: Vec<u8, Global>,
pub sequence_number: Option<u64>,
pub topic: TopicHash,
}
Expand description
The message sent to the user after a RawGossipsubMessage
has been transformed by a
crate::DataTransform
.
Fields
source: Option<PeerId>
Id of the peer that published this message.
data: Vec<u8, Global>
Content of the message.
sequence_number: Option<u64>
A random sequence number.
topic: TopicHash
The topic this message belongs to
Trait Implementations
sourceimpl Clone for GossipsubMessage
impl Clone for GossipsubMessage
sourcepub fn clone(&self) -> GossipsubMessage
pub fn clone(&self) -> GossipsubMessage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GossipsubMessage
impl Debug for GossipsubMessage
sourceimpl Hash for GossipsubMessage
impl Hash for GossipsubMessage
sourceimpl PartialEq<GossipsubMessage> for GossipsubMessage
impl PartialEq<GossipsubMessage> for GossipsubMessage
sourcepub fn eq(&self, other: &GossipsubMessage) -> bool
pub fn eq(&self, other: &GossipsubMessage) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &GossipsubMessage) -> bool
pub fn ne(&self, other: &GossipsubMessage) -> bool
This method tests for !=
.
impl Eq for GossipsubMessage
impl StructuralEq for GossipsubMessage
impl StructuralPartialEq for GossipsubMessage
Auto Trait Implementations
impl RefUnwindSafe for GossipsubMessage
impl Send for GossipsubMessage
impl Sync for GossipsubMessage
impl Unpin for GossipsubMessage
impl UnwindSafe for GossipsubMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more