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
impl Eq for FloodsubMessage
impl StructuralPartialEq for FloodsubMessage
Auto Trait Implementations§
impl !Freeze for FloodsubMessage
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more