Trait PFields
pub trait PFields: Debug {
// Required methods
fn parts(&self) -> PFieldsParts<'_> ⓘ;
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 pfields_segments(&self) -> ByteSegments<'_>;
fn fields_header_ref(&self) -> &PFieldsHeader;
}
Expand description
General trait for accessing point field.
Fields are included in LkHash.
Various fields are accessed through [PFieldsExt]
Impl’ed by [[PFieldsPtr]] and [[PFieldsParts]] [[PFieldsPtr]] impls is a byte layout [[PFieldsParts]] impl is a rusty enum repr
Required Methods§
fn data(&self) -> &[u8] ⓘ
fn tail(&self) -> Option<Tail<'_>>
fn padding(&self) -> &[u8] ⓘ
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>
fn linkpoint_header(&self) -> Option<&LinkPointHeader>
Return a LinkPFieldsHeader, works for both key and link points.
fn signed(&self) -> Option<&Signed>
fn pfields_segments(&self) -> ByteSegments<'_>
fn pfields_segments(&self) -> ByteSegments<'_>
A utility function to translate this format into bytes for hashing & io