pub struct TransmitBuild<T: DelayedTransmitBuild + Debug> {
pub data: T,
pub transport: TransportType,
pub from: SocketAddr,
pub to: SocketAddr,
}Expand description
A piece of data that needs to be built before it can be transmitted.
Fields§
§data: TThe data blob
transport: TransportTypeThe transport for the transmission
from: SocketAddrThe source address of the transmission
to: SocketAddrThe destination address of the transmission
Implementations§
Source§impl<T: DelayedTransmitBuild + Debug> TransmitBuild<T>
impl<T: DelayedTransmitBuild + Debug> TransmitBuild<T>
Sourcepub fn new(
data: T,
transport: TransportType,
from: SocketAddr,
to: SocketAddr,
) -> Self
pub fn new( data: T, transport: TransportType, from: SocketAddr, to: SocketAddr, ) -> Self
Construct a new Transmit with the specifid data and 5-tuple.
Sourcepub fn write_into(self, dest: &mut [u8]) -> Transmit<&mut [u8]>
pub fn write_into(self, dest: &mut [u8]) -> Transmit<&mut [u8]>
Write the TransmitBuild into the provided destination buffer.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TransmitBuild<T>where
T: Freeze,
impl<T> RefUnwindSafe for TransmitBuild<T>where
T: RefUnwindSafe,
impl<T> Send for TransmitBuild<T>where
T: Send,
impl<T> Sync for TransmitBuild<T>where
T: Sync,
impl<T> Unpin for TransmitBuild<T>where
T: Unpin,
impl<T> UnwindSafe for TransmitBuild<T>where
T: 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