Skip to main content

ValueRef

Enum ValueRef 

Source
pub enum ValueRef<'a> {
Show 13 variants Unsigned(u64), Negative(u64), Bytes(&'a [u8]), Text(&'a str), Array(&'a [ValueRef<'a>]), Map(&'a [MapEntry<'a>]), Tag(u64, &'a ValueRef<'a>), Float(&'a Float), Bool(bool), Null, Undefined, Simple(u8), Received(&'a Frame<'a>),
}
Expand description

Borrowed encoding input. Arrays and maps retain caller order. Scalar integer copies zeroize on drop; borrowed storage remains the caller’s responsibility. No payload-printing or cloning traits are implemented.

Variants§

§

Unsigned(u64)

Full unsigned 64-bit integer.

§

Negative(u64)

Full unsigned argument n for the negative integer -1-n.

§

Bytes(&'a [u8])

Borrowed byte contents.

§

Text(&'a str)

Borrowed UTF-8 text.

§

Array(&'a [ValueRef<'a>])

Ordered array elements.

§

Map(&'a [MapEntry<'a>])

Ordered unique map entries; equivalence is checked before returning output.

§

Tag(u64, &'a ValueRef<'a>)

Arbitrary tag and its child; application-specific semantics remain opaque.

§

Float(&'a Float)

Borrowed protected floating-point value.

§

Bool(bool)

Boolean.

§

Null

Null.

§

Undefined

Undefined.

§

Simple(u8)

Simple value (0..23 or 32..255); codes 24..31 are reserved.

§

Received(&'a Frame<'a>)

Embed the complete received encoding verbatim, subject to the selected profile and remaining budgets. This variant never normalizes input.

Trait Implementations§

Source§

impl Drop for ValueRef<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl ZeroizeOnDrop for ValueRef<'_>

Auto Trait Implementations§

§

impl<'a> Forget for ValueRef<'a>

§

impl<'a> Freeze for ValueRef<'a>

§

impl<'a> Move for ValueRef<'a>

§

impl<'a> RefUnwindSafe for ValueRef<'a>

§

impl<'a> Send for ValueRef<'a>

§

impl<'a> Sync for ValueRef<'a>

§

impl<'a> Unpin for ValueRef<'a>

§

impl<'a> UnsafeUnpin for ValueRef<'a>

§

impl<'a> UnwindSafe for ValueRef<'a>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.