pub enum InnerBody {
Control(ControlBody),
Original(OriginalBody),
Split(SplitBody),
}Variants§
Implementations§
Source§impl InnerBody
impl InnerBody
pub fn into_reliable(self, seqnum: WrappingSequenceNumber) -> PacketBody
pub fn into_unreliable(self) -> PacketBody
Sourcepub fn command(&self) -> Option<&Command>
pub fn command(&self) -> Option<&Command>
Get a reference to the Command this body contains, if any. If this is part of a split packet, None will be returned even though there is a fragment of a Command inside.
This doesn’t differentiate between a body which cannot have a command and a body which doesn’t have a command.
Trait Implementations§
Source§impl Deserialize for InnerBody
impl Deserialize for InnerBody
fn deserialize(deser: &mut Deserializer<'_>) -> DeserializeResult<Self>
impl StructuralPartialEq for InnerBody
Auto Trait Implementations§
impl Freeze for InnerBody
impl RefUnwindSafe for InnerBody
impl Send for InnerBody
impl Sync for InnerBody
impl Unpin for InnerBody
impl UnwindSafe for InnerBody
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