Struct linkspace_pkt::point::PointHeader
source · #[repr(C, align(4))]pub struct PointHeader {
pub reserved: u8,
pub point_type: PointTypeFlags,
pub point_size: U16,
}Fields§
§reserved: u8§point_type: PointTypeFlags§point_size: U16Implementations§
source§impl PointHeader
impl PointHeader
pub const ERROR: Self = _
pub const fn new( kind: PointTypeFlags, content_len: usize ) -> Result<Self, Error>
pub const fn check(self) -> Result<Self, Error>
pub fn as_bytes(&self) -> &[u8; 4]
sourcepub const fn point_size(&self) -> usize
pub const fn point_size(&self) -> usize
Size of a point (type,length,content). This is without the hash.
sourcepub const fn content_size(&self) -> usize
pub const fn content_size(&self) -> usize
size of a point’s content. If it is a datapoint, this is the size of the data.
sourcepub const fn net_pkt_size(&self) -> usize
pub const fn net_pkt_size(&self) -> usize
Size of a netpkt. The pointsize plus pointhash and netpktheader
Trait Implementations§
source§impl Clone for PointHeader
impl Clone for PointHeader
source§fn clone(&self) -> PointHeader
fn clone(&self) -> PointHeader
Returns a copy 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 PointHeader
impl Debug for PointHeader
source§impl PartialEq<PointHeader> for PointHeader
impl PartialEq<PointHeader> for PointHeader
source§fn eq(&self, other: &PointHeader) -> bool
fn eq(&self, other: &PointHeader) -> bool
This method tests for
self and other values to be equal, and is used
by ==.