Struct PointBox

pub struct PointBox(/* private fields */);
Expand description

Heap allocated repr of a Point.

Implementations§

§

impl PointBox

pub fn as_ptr(&self) -> &PointPtr

Methods from Deref<Target = PointPtr>§

pub fn as_sized(&self) -> &PointFatPtr

pub fn reroute(&self, route: XHeader) -> MutXHeaderPoint<&PointPtr>

pub fn check(&self, check: CheckHash) -> Result<(), Error>

pub fn as_point_bytes(&self) -> &[u8]

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>

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]

include padding

Trait Implementations§

§

impl AsPointPtr for PointBox

§

fn as_netptr(&self) -> &PointPtr

§

impl Borrow<PointPtr> for PointBox

§

fn borrow(&self) -> &PointPtr

Immutably borrows from an owned value. Read more
§

impl Clone for PointBox

§

fn clone(&self) -> PointBox

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for PointBox

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for PointBox

§

type Target = PointPtr

The resulting type after dereferencing.
§

fn deref(&self) -> &<PointBox as Deref>::Target

Dereferences the value.
§

impl<'de> Deserialize<'de> for PointBox

§

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 Drop for PointBox

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl From<&dyn Point> for PointBox

§

fn from(value: &dyn Point) -> PointBox

Converts to this type from the input type.
§

impl<'o> From<PointParts<'o>> for PointBox

§

fn from(value: PointParts<'o>) -> PointBox

Converts to this type from the input type.
§

impl MutXHeader for PointBox

§

fn mut_xheader(&mut self) -> &mut XHeader

§

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>

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

§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 T
where T: Point + MutXHeader,

§

fn update_xheader(&mut self, nethead: &dyn SetXHeader)

§

impl<T> PFields for T
where T: PointExt,

§

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

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 LinkPFieldsHeader, works for both key and link points.
§

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

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

fn fields_header_ref(&self) -> &PFieldsHeader

§

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

§

impl<T> PFieldsExt for T
where T: PFields + ?Sized,

§

fn fields(&self) -> PFieldsEnum<'_>

§

fn point_header(&self) -> PFieldsHeader

§

fn is_datapoint(&self) -> bool

§

fn is_linkpoint(&self) -> bool

§

fn is_keypoint(&self) -> bool

§

fn is_signed(&self) -> bool

§

fn as_datapoint(&self) -> Option<&[u8]>

§

fn as_linkpoint(&self) -> Option<LinkFields<'_>>

§

fn as_keypoint(&self) -> Option<(LinkFields<'_>, Signed)>

§

fn group(&self) -> Option<&B64<[u8; 32]>>

§

fn get_group(&self) -> &B64<[u8; 32]>

§

fn domain(&self) -> Option<&AB<[u8; 16]>>

§

fn get_domain(&self) -> &AB<[u8; 16]>

§

fn stamp(&self) -> Option<&U64>

§

fn get_stamp(&self) -> &U64

§

fn signature(&self) -> Option<&B64<[u8; 64]>>

§

fn get_signature(&self) -> &B64<[u8; 64]>

§

fn pubkey(&self) -> Option<&B64<[u8; 32]>>

§

fn get_pubkey(&self) -> &B64<[u8; 32]>

§

fn path(&self) -> Option<&LkPath>

§

fn pathsegm(&self) -> Option<&LkPathSegm>

§

fn nparts(&self) -> Option<&u8>

§

fn get_nparts(&self) -> &u8

§

fn get_path(&self) -> &LkPath

§

fn get_pathsegm(&self) -> &LkPathSegm

§

fn data_str(&self) -> Result<&str, Utf8Error>

§

fn compute_hash(&self) -> B64<[u8; 32]>

§

fn check_private(&self) -> Result<(), Error>

§

impl<T> PointExt for T
where T: Point + ?Sized,

§

fn get_recv(&self) -> U64

§

fn hash(&self) -> B64<[u8; 32]>

§

fn xheader(&self) -> XHeader

§

fn size(&self) -> u16

serialized size ( including padding )
§

fn free_space(&self) -> u16

§

fn as_netparts(&self) -> PointParts<'_>
where Self: Sized,

§

fn to_default_str(&self) -> String

§

fn as_dyn(&self) -> &dyn Point
where Self: Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithNewXHeader for T
where T: NewPoint,

§

fn with_xheader(self, nethead: &dyn SetXHeader) -> Self

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,