pub struct Data<P> {
pub id: BroadcastId,
pub payload: P,
}Expand description
What this layer adds to the wire: the originator, and the payload.
The first header contributed above the perfect link’s. It exists because a relayer is not the sender, and without it a recipient could not tell who originated what it received.
Fields§
§id: BroadcastId§payload: PTrait Implementations§
Source§impl<'de, P> Deserialize<'de> for Data<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for Data<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 Data<P>
impl<P: PartialEq> StructuralPartialEq for Data<P>
Auto Trait Implementations§
impl<P> Freeze for Data<P>where
P: Freeze,
impl<P> RefUnwindSafe for Data<P>where
P: RefUnwindSafe,
impl<P> Send for Data<P>where
P: Send,
impl<P> Sync for Data<P>where
P: Sync,
impl<P> Unpin for Data<P>where
P: Unpin,
impl<P> UnsafeUnpin for Data<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Data<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