Struct zerovec::ule::vartuple::VarTupleULE

source ·
#[repr(C)]
pub struct VarTupleULE<A: AsULE, V: VarULE + ?Sized> { pub sized: A::ULE, pub variable: V, }
Expand description

A dynamically-sized type combining a sized and an unsized type.

See the module for examples.

Fields§

§sized: A::ULE§variable: V

Trait Implementations§

source§

impl<A: Debug + AsULE, V: Debug + VarULE + ?Sized> Debug for VarTupleULE<A, V>
where A::ULE: Debug,

source§

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

Formats the value using the given formatter. Read more
source§

impl<'a, 'de: 'a, A, V> Deserialize<'de> for &'a VarTupleULE<A, V>
where A: AsULE + 'static + Deserialize<'de>, V: VarULE + ?Sized,

source§

fn deserialize<Des>(deserializer: Des) -> Result<Self, Des::Error>
where Des: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'de, A, V> Deserialize<'de> for Box<VarTupleULE<A, V>>
where A: AsULE + 'static + Deserialize<'de>, V: VarULE + ?Sized, Box<V>: Deserialize<'de>,

source§

fn deserialize<Des>(deserializer: Des) -> Result<Self, Des::Error>
where Des: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<A, B, V> EncodeAsVarULE<VarTupleULE<A, V>> for VarTuple<A, B>
where A: AsULE + 'static, B: EncodeAsVarULE<V>, V: VarULE + ?Sized,

source§

fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated produce the memory pattern of the corresponding instance of T. Read more
source§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding VarULE type
source§

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding VarULE type to the dst buffer. dst should be the size of Self::encode_var_ule_len()
source§

impl<A: Ord + AsULE, V: Ord + VarULE + ?Sized> Ord for VarTupleULE<A, V>
where A::ULE: Ord,

source§

fn cmp(&self, other: &VarTupleULE<A, V>) -> Ordering

This method returns an Ordering between self and other. Read more
source§

impl<A: PartialEq + AsULE, V: PartialEq + VarULE + ?Sized> PartialEq for VarTupleULE<A, V>
where A::ULE: PartialEq,

source§

fn eq(&self, other: &VarTupleULE<A, V>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<A: PartialOrd + AsULE, V: PartialOrd + VarULE + ?Sized> PartialOrd for VarTupleULE<A, V>
where A::ULE: PartialOrd,

source§

fn partial_cmp(&self, other: &VarTupleULE<A, V>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<A, V> Serialize for VarTupleULE<A, V>
where A: AsULE + 'static + Serialize, V: VarULE + ?Sized + Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<A, V> ToOwned for VarTupleULE<A, V>
where A: AsULE + 'static, V: VarULE + ?Sized,

source§

type Owned = Box<VarTupleULE<A, V>>

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<A, V> VarULE for VarTupleULE<A, V>
where A: AsULE + 'static, V: VarULE + ?Sized,

source§

fn validate_byte_slice(bytes: &[u8]) -> Result<(), UleError>

Validates a byte slice, &[u8]. Read more
source§

unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &Self

Takes a byte slice, &[u8], and return it as &Self with the same lifetime, assuming that this byte slice has previously been run through Self::parse_byte_slice() with success. Read more
source§

fn parse_byte_slice(bytes: &[u8]) -> Result<&Self, UleError>

Parses a byte slice, &[u8], and return it as &Self with the same lifetime. Read more
source§

fn as_byte_slice(&self) -> &[u8]

Given &Self, returns a &[u8] with the same lifetime. Read more
source§

fn to_boxed(&self) -> Box<Self>

Allocate on the heap as a Box<T>
source§

impl<'a, A, B, V> ZeroFrom<'a, VarTupleULE<A, V>> for VarTuple<A, B>
where A: AsULE + 'static, V: VarULE + ?Sized, B: ZeroFrom<'a, V>,

source§

fn zero_from(other: &'a VarTupleULE<A, V>) -> Self

Clone the other C into a struct that may retain references into C.
source§

impl<A: Eq + AsULE, V: Eq + VarULE + ?Sized> Eq for VarTupleULE<A, V>
where A::ULE: Eq,

source§

impl<A: AsULE, V: VarULE + ?Sized> StructuralPartialEq for VarTupleULE<A, V>

Auto Trait Implementations§

§

impl<A, V> Freeze for VarTupleULE<A, V>
where <A as AsULE>::ULE: Freeze, V: Freeze + ?Sized,

§

impl<A, V> RefUnwindSafe for VarTupleULE<A, V>
where <A as AsULE>::ULE: RefUnwindSafe, V: RefUnwindSafe + ?Sized,

§

impl<A, V> Send for VarTupleULE<A, V>
where <A as AsULE>::ULE: Send, V: Send + ?Sized,

§

impl<A, V> Sync for VarTupleULE<A, V>
where <A as AsULE>::ULE: Sync, V: Sync + ?Sized,

§

impl<A, V> Unpin for VarTupleULE<A, V>
where <A as AsULE>::ULE: Unpin, V: Unpin + ?Sized,

§

impl<A, V> UnwindSafe for VarTupleULE<A, V>
where <A as AsULE>::ULE: UnwindSafe, V: UnwindSafe + ?Sized,

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

source§

fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated produce the memory pattern of the corresponding instance of T. Read more
source§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding VarULE type
source§

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding VarULE type to the dst buffer. dst should be the size of Self::encode_var_ule_len()
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, U> TryFrom<U> for T
where U: Into<T>,

source§

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

impl<T> ErasedDestructor for T
where T: 'static,