Struct libp2p::floodsub::FloodsubMessage
source · [−]pub struct FloodsubMessage {
pub source: PeerId,
pub data: Vec<u8, Global>,
pub sequence_number: Vec<u8, Global>,
pub topics: Vec<Topic, Global>,
}
Expand description
A message received by the floodsub system.
Fields
source: PeerId
Id of the peer that published this message.
data: Vec<u8, Global>
Content of the message. Its meaning is out of scope of this library.
sequence_number: Vec<u8, Global>
An incrementing sequence number.
topics: Vec<Topic, Global>
List of topics this message belongs to.
Each message can belong to multiple topics at once.
Trait Implementations
sourceimpl Clone for FloodsubMessage
impl Clone for FloodsubMessage
sourcepub fn clone(&self) -> FloodsubMessage
pub fn clone(&self) -> FloodsubMessage
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 FloodsubMessage
impl Debug for FloodsubMessage
sourceimpl Hash for FloodsubMessage
impl Hash for FloodsubMessage
sourceimpl PartialEq<FloodsubMessage> for FloodsubMessage
impl PartialEq<FloodsubMessage> for FloodsubMessage
sourcepub fn eq(&self, other: &FloodsubMessage) -> bool
pub fn eq(&self, other: &FloodsubMessage) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &FloodsubMessage) -> bool
pub fn ne(&self, other: &FloodsubMessage) -> bool
This method tests for !=
.
impl Eq for FloodsubMessage
impl StructuralEq for FloodsubMessage
impl StructuralPartialEq for FloodsubMessage
Auto Trait Implementations
impl RefUnwindSafe for FloodsubMessage
impl Send for FloodsubMessage
impl Sync for FloodsubMessage
impl Unpin for FloodsubMessage
impl UnwindSafe for FloodsubMessage
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