pub struct TermValue { /* private fields */ }Expand description
Wiki ADR-029: a single Term variant’s evaluated value, carried as a
fixed-capacity byte buffer with an active-prefix length. The
catamorphism produces a TermValue per variant, propagated up the
term tree by the per-variant fold rules.
Implementations§
Source§impl TermValue
impl TermValue
Sourcepub const fn from_slice(bytes: &[u8]) -> TermValue
pub const fn from_slice(bytes: &[u8]) -> TermValue
Construct a TermValue from a slice; copies up to TERM_VALUE_MAX_BYTES bytes.
Sourcepub const fn from_u64_be(value: u64, width: usize) -> TermValue
pub const fn from_u64_be(value: u64, width: usize) -> TermValue
ADR-051: construct a TermValue from a u64 value at a declared byte width.
The high (8 - width) bytes of the u64 are discarded; the low width bytes are
written into the value buffer in big-endian order.
Trait Implementations§
impl Copy for TermValue
impl Eq for TermValue
impl StructuralPartialEq for TermValue
Auto Trait Implementations§
impl Freeze for TermValue
impl RefUnwindSafe for TermValue
impl Send for TermValue
impl Sync for TermValue
impl Unpin for TermValue
impl UnsafeUnpin for TermValue
impl UnwindSafe for TermValue
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