Struct PointBox
pub struct PointBox(/* private fields */);
Expand description
Heap allocated repr of a Point.
Implementations§
Methods from Deref<Target = PFieldsThinPtr>§
pub fn pf_header(&self) -> &PFieldsHeader
pub fn as_sized(&self) -> &PFieldsPtr ⓘ
pub fn internal_consitent_length(&self) -> Result<(), Error>
pub fn internal_consitent_length(&self) -> Result<(), Error>
Check the header length fields and return the point size. This is the length without the hash.
pub fn check_signature(&self) -> Result<(), Error>
pub fn pfields_bytes(&self) -> &[u8] ⓘ
pub fn pfields_bytes(&self) -> &[u8] ⓘ
include padding
Trait Implementations§
§impl<'de> Deserialize<'de> for PointBox
impl<'de> Deserialize<'de> for PointBox
§fn deserialize<D>(
deserializer: D,
) -> Result<PointBox, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<PointBox, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§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 PointBox
impl MutXHeader for PointBox
fn mut_xheader(&mut self) -> &mut XHeader
§impl Point for PointBox
impl Point for PointBox
fn as_fields(&self) -> &dyn PFields
fn hash_ref(&self) -> &B64<[u8; 32]>
fn xheader_ref(&self) -> &XHeader
§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 byte_segments(&self) -> ByteSegments<'_>
fn as_box(&self) -> PointBox ⓘ
fn as_arc(&self) -> PointArc ⓘ
§impl Serialize for PointBox
impl Serialize for PointBox
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Send for PointBox
impl Sync for PointBox
Auto Trait Implementations§
impl Freeze for PointBox
impl RefUnwindSafe for PointBox
impl Unpin for PointBox
impl UnwindSafe for PointBox
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