pub struct CRFrameObject {
pub version: u8,
pub ftype: CRFrameObjectType,
pub payload: Vec<u8>,
}
Expand description
A Caraspace object, that can be stored within a frame.
For the connaiseur: This is basically a TofPacket on steroids
Fields§
§version: u8
§ftype: CRFrameObjectType
§payload: Vec<u8>
serialized representation of the content object
Implementations§
Source§impl CRFrameObject
impl CRFrameObject
Trait Implementations§
Source§impl CRSerializeable for CRFrameObject
impl CRSerializeable for CRFrameObject
Source§fn deserialize(
stream: &Vec<u8>,
pos: &mut usize,
) -> Result<Self, CRSerializationError>where
Self: Sized,
fn deserialize(
stream: &Vec<u8>,
pos: &mut usize,
) -> Result<Self, CRSerializationError>where
Self: Sized,
Decode a serializable from a bytestream
const CRHEAD: u16 = 43_690u16
const CRTAIL: u16 = 21_845u16
Source§const CRSIZE: usize = 0usize
const CRSIZE: usize = 0usize
The SIZE is the size of the serialized
bytestream INCLUDING 4 bytes for head
and tail bytes. In case the struct does
NOT HAVE a fixed size, SIZE will be 0
(so default value of the trait
Source§fn verify_fixed(
stream: &Vec<u8>,
pos: &mut usize,
) -> Result<(), CRSerializationError>
fn verify_fixed( stream: &Vec<u8>, pos: &mut usize, ) -> Result<(), CRSerializationError>
Verify that the serialized representation of the struct has the
correct size, including header + footer. Read more
Source§impl Clone for CRFrameObject
impl Clone for CRFrameObject
Source§fn clone(&self) -> CRFrameObject
fn clone(&self) -> CRFrameObject
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 CRFrameObject
impl Debug for CRFrameObject
Auto Trait Implementations§
impl Freeze for CRFrameObject
impl RefUnwindSafe for CRFrameObject
impl Send for CRFrameObject
impl Sync for CRFrameObject
impl Unpin for CRFrameObject
impl UnwindSafe for CRFrameObject
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