Struct linkspace::misc::RecvPkt

pub struct RecvPkt<T = Box<NetPktFatPtr>>where
    T: ?Sized,{
    pub recv: U64,
    pub pkt: T,
}
Expand description

Wrapper around a NetPkt that sets its recv field

For NetPkt::recv and during abe evaluation

Fields§

§recv: U64§pkt: T

Implementations§

§

impl<A> RecvPkt<A>

pub fn from_dyn(pkt: &dyn NetPkt) -> RecvPkt<A> where A: for<'o> From<&'o dyn NetPkt>,

pub fn map<B>(self, fnc: impl FnOnce(A) -> B) -> RecvPkt<B>

pub fn owned(self) -> RecvPkt where A: NetPkt,

Trait Implementations§

§

impl<T> Clone for RecvPkt<T>where T: Clone + ?Sized,

§

fn clone(&self) -> RecvPkt<T>

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<T> Debug for RecvPkt<T>where T: Debug + ?Sized,

§

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

Formats the value using the given formatter. Read more
§

impl<T> Deref for RecvPkt<T>where T: ?Sized,

§

type Target = T

The resulting type after dereferencing.
§

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

Dereferences the value.
§

impl<A> From<&dyn NetPkt> for RecvPkt<A>where A: for<'o> From<&'o dyn NetPkt>,

§

fn from(value: &dyn NetPkt) -> RecvPkt<A>

Converts to this type from the input type.
§

impl<T> NetPkt for RecvPkt<T>where T: NetPkt + ?Sized,

§

fn hash_ref(&self) -> &B64

§

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

recv is somewhat special. 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 net_header_ref(&self) -> &NetPktHeader

§

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

§

fn as_point(&self) -> &dyn Point

§

fn net_header_mut(&mut self) -> Option<&mut NetPktHeader>

§

fn as_netbox(&self) -> Box<NetPktFatPtr>

§

fn as_netarc(&self) -> NetPktArc

§

impl<T> Copy for RecvPkt<T>where T: Copy + ?Sized,

Auto Trait Implementations§

§

impl<T: ?Sized> RefUnwindSafe for RecvPkt<T>where T: RefUnwindSafe,

§

impl<T: ?Sized> Send for RecvPkt<T>where T: Send,

§

impl<T: ?Sized> Sync for RecvPkt<T>where T: Sync,

§

impl<T: ?Sized> Unpin for RecvPkt<T>where T: Unpin,

§

impl<T: ?Sized> UnwindSafe for RecvPkt<T>where T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

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 Twhere 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.

§

impl<T> IntoResult<T> for T

§

type Err = Infallible

§

fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>

§

impl<T> NetPktExt for Twhere T: NetPkt + ?Sized,

§

fn get_recv(&self) -> U64

§

fn hash(&self) -> B64

§

fn net_header(&self) -> NetPktHeader

§

fn size(&self) -> u16

Padded size
§

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

§

fn to_default_str(&self) -> String

§

impl<T> Point for Twhere T: NetPktExt,

§

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

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

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

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

fn point_header_ref(&self) -> &PointHeader

§

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

§

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

§

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

§

fn point_header(&self) -> PointHeader

§

fn is_datapoint(&self) -> bool

§

fn is_linkpoint(&self) -> bool

§

fn is_keypoint(&self) -> bool

§

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

§

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

§

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

§

fn group(&self) -> Option<&B64>

§

fn get_group(&self) -> &B64

§

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

§

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

§

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

§

fn get_create_stamp(&self) -> &U64

§

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

§

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

§

fn pubkey(&self) -> Option<&B64>

§

fn get_pubkey(&self) -> &B64

§

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

§

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

§

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

§

fn get_depth(&self) -> &u8

§

fn get_rooted_spacename(&self) -> &RootedSpaceBytes<[u8]>

§

fn get_spacename(&self) -> &SpaceBytes<[u8]>

§

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

§

fn select(&self) -> SelectLink<'_>

§

fn compute_hash(&self) -> B64

§

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

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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 Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> Formattable for Twhere T: Deref, <T as Deref>::Target: Formattable,

§

impl<T> Parsable for Twhere T: Deref, <T as Deref>::Target: Parsable,