Struct libp2p_floodsub::protocol::FloodsubMessage
source · [−]pub struct FloodsubMessage {
pub source: PeerId,
pub data: Vec<u8>,
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: 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<Topic>
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 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
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &FloodsubMessage) -> bool
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> 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