Struct Link
#[repr(C, align(4))]pub struct Link {
pub tag: AB<[u8; 16]>,
pub ptr: B64<[u8; 32]>,
}
Fields§
§tag: AB<[u8; 16]>
§ptr: B64<[u8; 32]>
Implementations§
§impl Link
impl Link
pub const DEFAULT: Link
pub fn new(tag: impl AsRef<[u8]>, ptr: impl Into<B64<[u8; 32]>>) -> Link
pub fn try_from( tag: impl AsRef<[u8]>, pointer: B64<[u8; 32]>, ) -> Result<Link, FitSliceErr>
pub fn as_bytes(&self) -> &[u8; 48]
pub fn from_bytes(bytes: &[u8; 48]) -> Link
pub fn slice_from_bytes(slice: &[u8]) -> Result<&[Link], (&[Link], &[u8])>
pub fn bytes_from_slice(slice: &[Link]) -> &[u8] ⓘ
Trait Implementations§
§impl Ord for Link
impl Ord for Link
§impl PartialOrd for Link
impl PartialOrd for Link
§impl<PTR, TAG> TryFrom<(TAG, PTR)> for Link
impl<PTR, TAG> TryFrom<(TAG, PTR)> for Link
impl Copy for Link
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnwindSafe for Link
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