Struct PointParts
#[repr(C, align(4))]pub struct PointParts<'a> {
pub net_header: XHeader,
/* private fields */
}
Expand description
Rust enum repr of a Point
Fields§
§net_header: XHeader
Implementations§
§impl<'a> PointParts<'a>
impl<'a> PointParts<'a>
pub fn from_unchecked(
net_header: XHeader,
hash: B64<[u8; 32]>,
fields: PFieldsParts<'a>,
) -> PointParts<'a> ⓘ
pub fn from_unchecked( net_header: XHeader, hash: B64<[u8; 32]>, fields: PFieldsParts<'a>, ) -> PointParts<'a> ⓘ
The caller must ensure PointHash matches the Point
pub fn from(point: &'a dyn Point) -> PointParts<'a> ⓘ
Trait Implementations§
§impl<'a> Clone for PointParts<'a>
impl<'a> Clone for PointParts<'a>
§fn clone(&self) -> PointParts<'a> ⓘ
fn clone(&self) -> PointParts<'a> ⓘ
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 more§impl<'a> Debug for PointParts<'a>
impl<'a> Debug for PointParts<'a>
§impl<'a> Deref for PointParts<'a>
impl<'a> Deref for PointParts<'a>
§impl<'o> From<PointParts<'o>> for PointArc
impl<'o> From<PointParts<'o>> for PointArc
§fn from(value: PointParts<'o>) -> PointArc ⓘ
fn from(value: PointParts<'o>) -> PointArc ⓘ
Converts to this type from the input type.
§impl<'o> From<PointParts<'o>> for PointBox
impl<'o> From<PointParts<'o>> for PointBox
§fn from(value: PointParts<'o>) -> PointBox ⓘ
fn from(value: PointParts<'o>) -> PointBox ⓘ
Converts to this type from the input type.
§impl MutXHeader for PointParts<'_>
impl MutXHeader for PointParts<'_>
fn mut_xheader(&mut self) -> &mut XHeader
§impl<'a> PartialEq for PointParts<'a>
impl<'a> PartialEq for PointParts<'a>
§impl Point for PointParts<'_>
impl Point for PointParts<'_>
fn hash_ref(&self) -> &B64<[u8; 32]>
fn xheader_ref(&self) -> &XHeader
fn byte_segments(&self) -> ByteSegments<'_>
fn as_fields(&self) -> &dyn PFields
§fn recv(&self) -> Option<U64>
fn recv(&self) -> Option<U64>
recv is a special field.
It depends on the context. Reading directly from the database it should return the stamp at which it was inserted.
NOTE: Do not rely on this value being unique - in the db or otherwise.
fn as_box(&self) -> PointBox ⓘ
fn as_arc(&self) -> PointArc ⓘ
impl<'a> Copy for PointParts<'a>
impl<'a> StructuralPartialEq for PointParts<'a>
Auto Trait Implementations§
impl<'a> Freeze for PointParts<'a>
impl<'a> RefUnwindSafe for PointParts<'a>
impl<'a> Send for PointParts<'a>
impl<'a> Sync for PointParts<'a>
impl<'a> Unpin for PointParts<'a>
impl<'a> UnwindSafe for PointParts<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> NewPoint for Twhere
T: Point + MutXHeader,
impl<T> NewPoint for Twhere
T: Point + MutXHeader,
fn update_xheader(&mut self, nethead: &dyn SetXHeader)
§impl<T> PFields for Twhere
T: PointExt,
impl<T> PFields for Twhere
T: PointExt,
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 pfields_segments(&self) -> ByteSegments<'_>
fn pfields_segments(&self) -> ByteSegments<'_>
A utility function to translate this format into bytes for hashing & io