Struct libp2p_floodsub::protocol::FloodsubMessage
source · pub struct FloodsubMessage {
pub source: PeerId,
pub data: Bytes,
pub sequence_number: Vec<u8>,
pub topics: Vec<Topic>,
}
Expand description
A message received by the floodsub system.
Fields§
§source: PeerId
Id of the peer that published this message.
data: Bytes
Content of the message. Its meaning is out of scope of this library.
sequence_number: Vec<u8>
An incrementing sequence number.
topics: Vec<Topic>
List of topics this message belongs to.
Each message can belong to multiple topics at once.
Trait Implementations§
source§impl Clone for FloodsubMessage
impl Clone for FloodsubMessage
source§fn clone(&self) -> FloodsubMessage
fn clone(&self) -> FloodsubMessage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FloodsubMessage
impl Debug for FloodsubMessage
source§impl Hash for FloodsubMessage
impl Hash for FloodsubMessage
source§impl PartialEq for FloodsubMessage
impl PartialEq for FloodsubMessage
source§fn eq(&self, other: &FloodsubMessage) -> bool
fn eq(&self, other: &FloodsubMessage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§
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