pub struct ForceChecksumAction(pub TransportChecksumAction);Expand description
A SerializationContext that forces a specific transport-layer
checksum action to be used.
Tuple Fields§
§0: TransportChecksumActionTrait Implementations§
Source§impl SerializationContext for ForceChecksumAction
impl SerializationContext for ForceChecksumAction
Source§type ContextState = ()
type ContextState = ()
The packet-specific state required by this serialization context.
Source§fn serialize_nested<O, R>(
&mut self,
_outer: &O,
constraints: PacketConstraints,
serialize_fn: impl FnOnce(&mut Self, PacketConstraints) -> R,
) -> Rwhere
O: PacketBuilder<Self>,
fn serialize_nested<O, R>(
&mut self,
_outer: &O,
constraints: PacketConstraints,
serialize_fn: impl FnOnce(&mut Self, PacketConstraints) -> R,
) -> Rwhere
O: PacketBuilder<Self>,
Performs nested serialization within the context of an outer
PacketBuilder. Read moreSource§impl TcpSerializationContext for ForceChecksumAction
impl TcpSerializationContext for ForceChecksumAction
Source§fn envelope_to_state(_envelope: TcpEnvelope) -> Self::ContextState
fn envelope_to_state(_envelope: TcpEnvelope) -> Self::ContextState
Converts a
TcpEnvelope into the serialization context’s state.Source§fn checksum_action(&mut self) -> TransportChecksumAction
fn checksum_action(&mut self) -> TransportChecksumAction
Returns the checksum action to take based on the serialization context.
Source§impl UdpSerializationContext for ForceChecksumAction
impl UdpSerializationContext for ForceChecksumAction
Source§fn envelope_to_state(_envelope: UdpEnvelope) -> Self::ContextState
fn envelope_to_state(_envelope: UdpEnvelope) -> Self::ContextState
Converts a
UdpEnvelope into the serialization context’s state.Source§fn checksum_action(&mut self) -> TransportChecksumAction
fn checksum_action(&mut self) -> TransportChecksumAction
Returns the checksum action to take based on the serialization context.
Auto Trait Implementations§
impl Freeze for ForceChecksumAction
impl RefUnwindSafe for ForceChecksumAction
impl Send for ForceChecksumAction
impl Sync for ForceChecksumAction
impl Unpin for ForceChecksumAction
impl UnsafeUnpin for ForceChecksumAction
impl UnwindSafe for ForceChecksumAction
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> 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