Trait linkspace::prelude::Point

pub trait Point: Debug {
    // Required methods
    fn parts(&self) -> PointParts<'_> ;
    fn data(&self) -> &[u8] ;
    fn tail(&self) -> Option<Tail<'_>>;
    fn padding(&self) -> &[u8] ;
    fn linkpoint_header(&self) -> Option<&LinkPointHeader>;
    fn signed(&self) -> Option<&Signed>;
    fn pkt_segments(&self) -> ByteSegments<'_>;
    fn point_header_ref(&self) -> &PointHeader;
}
Expand description

General trait for accessing point field.

Fields are included in LkHash.

Various fields are accessed through [PointExt]

Impl’ed by [[PointPtr]] and [[PointParts]] [[PointPtr]] impls is a byte layout [[PointParts]] impl is a rusty enum repr

Required Methods§

fn parts(&self) -> PointParts<'_>

The rusty enum repr of a point.

fn data(&self) -> &[u8]

fn tail(&self) -> Option<Tail<'_>>

fn padding(&self) -> &[u8]

Points are padded with upto 7 \xFF bytes and are u64 aligned - this is accessible here for completeness sake.

fn linkpoint_header(&self) -> Option<&LinkPointHeader>

Return a LinkPointHeader, works for both key and link points.

fn signed(&self) -> Option<&Signed>

fn pkt_segments(&self) -> ByteSegments<'_>

A utility function to translate this format into bytes for hashing & io

fn point_header_ref(&self) -> &PointHeader

Implementors§

§

impl Point for PointPtr

§

impl Point for PointThinPtr

§

impl<'tail> Point for PointParts<'tail>

§

impl<T> Point for Twhere T: NetPktExt,