Struct comms_service::SpacePacket
source · [−]pub struct SpacePacket { /* private fields */ }
Expand description
Structure used to implement SpacePacket version of LinkPacket
Trait Implementations
sourceimpl Debug for SpacePacket
impl Debug for SpacePacket
sourceimpl LinkPacket for SpacePacket
impl LinkPacket for SpacePacket
sourcefn build(
command_id: u64,
payload_type: PayloadType,
destination_port: u16,
payload: &[u8]
) -> CommsResult<Box<Self>>
fn build(
command_id: u64,
payload_type: PayloadType,
destination_port: u16,
payload: &[u8]
) -> CommsResult<Box<Self>>
Build packet from necessary parts
sourcefn parse(raw: &[u8]) -> CommsResult<Box<Self>>
fn parse(raw: &[u8]) -> CommsResult<Box<Self>>
Parse packet from raw bytes
sourcefn to_bytes(&self) -> CommsResult<Vec<u8>>
fn to_bytes(&self) -> CommsResult<Vec<u8>>
Create a bytes representation of the packet
sourcefn command_id(&self) -> u64
fn command_id(&self) -> u64
The Command ID of the packet
sourcefn payload_type(&self) -> PayloadType
fn payload_type(&self) -> PayloadType
The type of payload contained in the packet
sourcefn destination(&self) -> u16
fn destination(&self) -> u16
The Destination port of the packet
sourceimpl PartialEq<SpacePacket> for SpacePacket
impl PartialEq<SpacePacket> for SpacePacket
sourcefn eq(&self, other: &SpacePacket) -> bool
fn eq(&self, other: &SpacePacket) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SpacePacket) -> bool
fn ne(&self, other: &SpacePacket) -> bool
This method tests for !=
.
impl Eq for SpacePacket
impl StructuralEq for SpacePacket
impl StructuralPartialEq for SpacePacket
Auto Trait Implementations
impl RefUnwindSafe for SpacePacket
impl Send for SpacePacket
impl Sync for SpacePacket
impl Unpin for SpacePacket
impl UnwindSafe for SpacePacket
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.