pub struct SkillMessage {
pub msg_type: SkillMessageType,
pub payload: Vec<u8>,
}Expand description
A raw skill message with type and payload bytes.
Fields§
§msg_type: SkillMessageType§payload: Vec<u8>Implementations§
Source§impl SkillMessage
impl SkillMessage
pub fn new(msg_type: SkillMessageType, payload: Vec<u8>) -> Self
Sourcepub fn deserialize_payload<T: for<'de> Deserialize<'de>>(&self) -> Option<T>
pub fn deserialize_payload<T: for<'de> Deserialize<'de>>(&self) -> Option<T>
Deserialize the JSON payload into a typed struct.
Trait Implementations§
Source§impl Clone for SkillMessage
impl Clone for SkillMessage
Source§fn clone(&self) -> SkillMessage
fn clone(&self) -> SkillMessage
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 moreAuto Trait Implementations§
impl Freeze for SkillMessage
impl RefUnwindSafe for SkillMessage
impl Send for SkillMessage
impl Sync for SkillMessage
impl Unpin for SkillMessage
impl UnsafeUnpin for SkillMessage
impl UnwindSafe for SkillMessage
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