pub enum ClientServerPacket {
Ping,
ProtocolVersion(u32),
PubKey(Vec<u8>),
ClientId(u64),
Challenge(Vec<u8>),
ChallengeResponse(Vec<u8>),
}Variants§
Ping
Bidirectional used for checking the connection after reconnect
ProtocolVersion(u32)
Unidirectional Client -> Server
PubKey(Vec<u8>)
Bidirectional
ClientId(u64)
Unidirectional Server -> Client
Challenge(Vec<u8>)
Unidirectional Server -> Client
ChallengeResponse(Vec<u8>)
Unidirectional Client -> Server
Implementations§
Source§impl ClientServerPacket
impl ClientServerPacket
pub fn into_vec(self) -> Result<Vec<u8>, EncodeError>
pub fn from_slice(data: &[u8]) -> Result<Self, DecodeError>
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for ClientServerPacket
impl<'__de, __Context> BorrowDecode<'__de, __Context> for ClientServerPacket
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for ClientServerPacket
impl Clone for ClientServerPacket
Source§fn clone(&self) -> ClientServerPacket
fn clone(&self) -> ClientServerPacket
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 moreSource§impl<__Context> Decode<__Context> for ClientServerPacket
impl<__Context> Decode<__Context> for ClientServerPacket
Auto Trait Implementations§
impl Freeze for ClientServerPacket
impl RefUnwindSafe for ClientServerPacket
impl Send for ClientServerPacket
impl Sync for ClientServerPacket
impl Unpin for ClientServerPacket
impl UnsafeUnpin for ClientServerPacket
impl UnwindSafe for ClientServerPacket
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