pub enum ReliableStationFrame {
Data {
sequence: u64,
payload: Vec<u8>,
},
Ack {
sequence: u64,
},
}Expand description
Encoded reliable station frame.
Variants§
Implementations§
Source§impl ReliableStationFrame
impl ReliableStationFrame
Sourcepub fn encode_data(
sequence: u64,
payload: &[u8],
out: &mut Vec<u8>,
) -> Result<(), ReliableStationEncodeError>
pub fn encode_data( sequence: u64, payload: &[u8], out: &mut Vec<u8>, ) -> Result<(), ReliableStationEncodeError>
Appends a data frame from a borrowed payload without materializing an owned frame.
Sourcepub fn encode(
&self,
out: &mut Vec<u8>,
) -> Result<(), ReliableStationEncodeError>
pub fn encode( &self, out: &mut Vec<u8>, ) -> Result<(), ReliableStationEncodeError>
Encodes a reliable station frame.
Sourcepub fn decode(input: &[u8]) -> Result<Self, ReliableStationDecodeError>
pub fn decode(input: &[u8]) -> Result<Self, ReliableStationDecodeError>
Decodes a reliable station frame.
Sourcepub fn decode_ref(
input: &[u8],
) -> Result<ReliableStationFrameRef<'_>, ReliableStationDecodeError>
pub fn decode_ref( input: &[u8], ) -> Result<ReliableStationFrameRef<'_>, ReliableStationDecodeError>
Decodes a reliable Station frame while borrowing data payload bytes.
Trait Implementations§
Source§impl Clone for ReliableStationFrame
impl Clone for ReliableStationFrame
Source§fn clone(&self) -> ReliableStationFrame
fn clone(&self) -> ReliableStationFrame
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 Debug for ReliableStationFrame
impl Debug for ReliableStationFrame
impl Eq for ReliableStationFrame
Source§impl PartialEq for ReliableStationFrame
impl PartialEq for ReliableStationFrame
impl StructuralPartialEq for ReliableStationFrame
Auto Trait Implementations§
impl Freeze for ReliableStationFrame
impl RefUnwindSafe for ReliableStationFrame
impl Send for ReliableStationFrame
impl Sync for ReliableStationFrame
impl Unpin for ReliableStationFrame
impl UnsafeUnpin for ReliableStationFrame
impl UnwindSafe for ReliableStationFrame
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