pub enum ServerMessageKind {
Success = 0,
Error = 1,
Notification = 255,
}Expand description
Discriminant identifying the nature of a server message.
Variants§
Success = 0
A successful response to a client request.
Error = 1
An error response to a client request.
Notification = 255
A server-initiated notification (not tied to a request).
Trait Implementations§
Source§impl BorshDeserialize for ServerMessageKind
impl BorshDeserialize for ServerMessageKind
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for ServerMessageKind
impl BorshSerialize for ServerMessageKind
Source§impl Clone for ServerMessageKind
impl Clone for ServerMessageKind
Source§fn clone(&self) -> ServerMessageKind
fn clone(&self) -> ServerMessageKind
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 moreimpl Copy for ServerMessageKind
Source§impl Debug for ServerMessageKind
impl Debug for ServerMessageKind
Source§impl EnumExt for ServerMessageKind
impl EnumExt for ServerMessageKind
Source§impl From<ServerMessageKind> for u32
impl From<ServerMessageKind> for u32
Source§fn from(kind: ServerMessageKind) -> u32
fn from(kind: ServerMessageKind) -> u32
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ServerMessageKind
impl RefUnwindSafe for ServerMessageKind
impl Send for ServerMessageKind
impl Sync for ServerMessageKind
impl Unpin for ServerMessageKind
impl UnsafeUnpin for ServerMessageKind
impl UnwindSafe for ServerMessageKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.