Trait Point

pub trait Point: Debug {
    // Required methods
    fn as_fields(&self) -> &dyn PFields;
    fn hash_ref(&self) -> &B64<[u8; 32]>;
    fn xheader_ref(&self) -> &XHeader;
    fn recv(&self) -> Option<U64>;
    fn byte_segments(&self) -> ByteSegments<'_>;

    // Provided methods
    fn as_box(&self) -> PointBox  { ... }
    fn as_arc(&self) -> PointArc  { ... }
}
Expand description

A trait to access fields of a point. Auto impls PointExt, PFields, and PFieldsExt.

A Point is the combination of Point, LkHash, XHeader. the trait is impl for various layouts such as PointBox, PointArc.

There are wrapping structs in as [reroute] that provide extended options.

Required Methods§

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<'_>

Provided Methods§

fn as_box(&self) -> PointBox

fn as_arc(&self) -> PointArc

Trait Implementations§

§

impl From<&dyn Point> for B64<[u8; 32]>

§

fn from(val: &dyn Point) -> B64<[u8; 32]>

Converts to this type from the input type.
§

impl From<&dyn Point> for PointArc

§

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

Converts to this type from the input type.
§

impl From<&dyn Point> for PointBox

§

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

Converts to this type from the input type.
§

impl<A> From<&dyn Point> for RecvPoint<A>
where A: for<'o> From<&'o dyn Point>,

§

fn from(value: &dyn Point) -> RecvPoint<A>

Converts to this type from the input type.
Source§

impl LkEnv for &dyn Point

Source§

fn userdata<'o>(&'o self, out: &mut LkEnvData<'o>)

Source§

fn as_scope(&self) -> LkaScope<'_>

Source§

impl TryAsSpace for &dyn Point

Source§

fn try_as_space(&self, _scope: &dyn LkEnv) -> Result<Space>

Implementations on Foreign Types§

§

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

§

fn as_fields(&self) -> &dyn PFields

§

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

§

fn xheader_ref(&self) -> &XHeader

§

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

§

fn as_box(&self) -> PointBox

§

fn as_arc(&self) -> PointArc

§

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

Implementors§

§

impl Point for PointArc

§

impl Point for PointBox

§

impl Point for PointParts<'_>

§

impl Point for PointPtr

§

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

§

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

§

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