Enum nardol::PacketKind
source · [−]pub enum PacketKind {
Empty,
MetaData,
MetaDataEnd,
Content,
End,
Unit,
Unknown,
}
Expand description
Determines kind of Packet.
Variants
Empty
Empty packet usually used only for testing or like a placeholder.
MetaData
Part of metadata
.
MetaDataEnd
Same as MetaData, only marking end of it.
Content
Content packet.
End
Used to signalize end of the [message
].
Can be TcpMessage or an end in general (of all times and you know it).
Unit
Usually used in udp context for signaling that given Packet
is the whole message
.
Unknown
Used in case if PacketKind is not recognized.
Trait Implementations
sourceimpl Clone for PacketKind
impl Clone for PacketKind
sourcefn clone(&self) -> PacketKind
fn clone(&self) -> PacketKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PacketKind
impl Debug for PacketKind
sourceimpl<'de> Deserialize<'de> for PacketKind
impl<'de> Deserialize<'de> for PacketKind
sourcefn 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
sourceimpl From<PacketKind> for Bytes
impl From<PacketKind> for Bytes
sourcefn from(value: PacketKind) -> Self
fn from(value: PacketKind) -> Self
Converts to this type from the input type.
sourceimpl FromRon<'_> for PacketKind
impl FromRon<'_> for PacketKind
sourceimpl PartialEq<PacketKind> for PacketKind
impl PartialEq<PacketKind> for PacketKind
sourceimpl Serialize for PacketKind
impl Serialize for PacketKind
sourceimpl ToRon for PacketKind
impl ToRon for PacketKind
sourceimpl TryFrom<Bytes> for PacketKind
impl TryFrom<Bytes> for PacketKind
impl StructuralPartialEq for PacketKind
Auto Trait Implementations
impl RefUnwindSafe for PacketKind
impl Send for PacketKind
impl Sync for PacketKind
impl Unpin for PacketKind
impl UnwindSafe for PacketKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more