#[non_exhaustive]pub enum Frame {
Handshake {
protocol: VarInt,
address: String,
port: u16,
state: VarInt,
},
StatusRequest,
StatusResponse {
json: String,
},
PingRequest {
payload: i64,
},
PingResponse {
payload: i64,
},
}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.
Implementations§
Source§impl Frame
impl Frame
pub const PROTOCOL_VERSION: i32 = 767
pub const HANDSHAKE_ID: i32 = 0x00
pub const STATUS_REQUEST_ID: i32 = 0x00
pub const STATUS_RESPONSE_ID: i32 = 0x00
pub const PING_REQUEST_ID: i32 = 0x01
pub const PING_RESPONSE_ID: i32 = 0x01
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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