pub struct Gossip<P> {
pub id: BroadcastId,
pub ttl: u32,
pub payload: P,
}Expand description
What this layer puts on the wire: the identifier, the rounds still to live, and the payload.
ttl is the book’s r. It is decremented at each hop and a message is not relayed once it
reaches one, which is what makes a broadcast generate finitely many transmissions.
Fields§
§id: BroadcastId§ttl: u32§payload: PTrait Implementations§
Source§impl<'de, P> Deserialize<'de> for Gossip<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for Gossip<P>where
P: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<P: Eq> Eq for Gossip<P>
impl<P: PartialEq> StructuralPartialEq for Gossip<P>
Auto Trait Implementations§
impl<P> Freeze for Gossip<P>where
P: Freeze,
impl<P> RefUnwindSafe for Gossip<P>where
P: RefUnwindSafe,
impl<P> Send for Gossip<P>where
P: Send,
impl<P> Sync for Gossip<P>where
P: Sync,
impl<P> Unpin for Gossip<P>where
P: Unpin,
impl<P> UnsafeUnpin for Gossip<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Gossip<P>where
P: UnwindSafe,
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