Enum SendPacketError
#[non_exhaustive]pub enum SendPacketError {
NotConnected,
NotInPlay,
UnknownPacket {
id: Identifier,
},
InvalidBody,
PayloadTooLarge {
size: u64,
limit: u64,
},
}Expand description
Why the client could not submit a play packet.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotConnected
There is no server connection.
NotInPlay
The player has not joined, or the connection is reconfiguring.
UnknownPacket
This protocol has no serverbound packet with the given type name.
Fields
§
id: IdentifierThe submitted type name.
InvalidBody
The body does not decode completely as the named play packet.
PayloadTooLarge
A custom payload exceeds vanilla’s size limit.
Trait Implementations§
§impl Clone for SendPacketError
impl Clone for SendPacketError
§fn clone(&self) -> SendPacketError
fn clone(&self) -> SendPacketError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for SendPacketError
impl Debug for SendPacketError
impl Eq for SendPacketError
§impl PartialEq for SendPacketError
impl PartialEq for SendPacketError
impl StructuralPartialEq for SendPacketError
Auto Trait Implementations§
impl Freeze for SendPacketError
impl RefUnwindSafe for SendPacketError
impl Send for SendPacketError
impl Sync for SendPacketError
impl Unpin for SendPacketError
impl UnsafeUnpin for SendPacketError
impl UnwindSafe for SendPacketError
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