Struct libp2p_floodsub::protocol::FloodsubMessage
source · pub struct FloodsubMessage {
pub source: PeerId,
pub data: Vec<u8>,
pub sequence_number: Vec<u8>,
pub topics: Vec<TopicHash>,
}
Expand description
A message received by the floodsub system.
Fields
source: PeerId
Id of the peer that published this message.
data: Vec<u8>
Content of the message. Its meaning is out of scope of this library.
sequence_number: Vec<u8>
An incrementing sequence number.
topics: Vec<TopicHash>
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
sourcefn clone(&self) -> FloodsubMessage
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 moresourceimpl 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
sourcefn eq(&self, other: &FloodsubMessage) -> bool
fn eq(&self, other: &FloodsubMessage) -> bool
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more