pub struct NegiconFrame {
pub origin: u16,
pub destination: u16,
pub message_type: NegiconMessageType,
pub message_data: [u8; 8],
/* private fields */
}Fields§
§origin: u16§destination: u16§message_type: NegiconMessageType§message_data: [u8; 8]Implementations§
Source§impl NegiconFrame
impl NegiconFrame
pub fn new( origin: u16, destination: u16, message_type: NegiconMessageType, message_data: [u8; 8], ) -> Self
pub fn ping( id: u16, module_type: NegiconModuleType, sequence: u8, fw_version: u16, ) -> Self
pub fn nop() -> Self
pub fn serialize(&self) -> [u8; 16]
pub fn is_ping(&self) -> bool
pub fn is_nop(&self) -> bool
pub fn serialize_u16(&self) -> [u16; 4]
pub fn serialize_u32(&self) -> [u32; 2]
pub fn deserialize(data: &[u8; 16]) -> Result<Self, InvalidMessage>
Trait Implementations§
Source§impl Clone for NegiconFrame
impl Clone for NegiconFrame
Source§fn clone(&self) -> NegiconFrame
fn clone(&self) -> NegiconFrame
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NegiconFrame
impl Debug for NegiconFrame
Source§impl PartialEq for NegiconFrame
impl PartialEq for NegiconFrame
impl Copy for NegiconFrame
impl StructuralPartialEq for NegiconFrame
Auto Trait Implementations§
impl Freeze for NegiconFrame
impl RefUnwindSafe for NegiconFrame
impl Send for NegiconFrame
impl Sync for NegiconFrame
impl Unpin for NegiconFrame
impl UnwindSafe for NegiconFrame
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