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, 'de: 'a, A, V> Deserialize<'de> for &'a VarTupleULE<A, V>
impl<'a, 'de: 'a, A, V> Deserialize<'de> for &'a VarTupleULE<A, V>
source§fn deserialize<Des>(deserializer: Des) -> Result<Self, Des::Error>where
Des: Deserializer<'de>,
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>>
impl<'de, A, V> Deserialize<'de> for Box<VarTupleULE<A, V>>
source§fn deserialize<Des>(deserializer: Des) -> Result<Self, Des::Error>where
Des: Deserializer<'de>,
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>
impl<A, B, V> EncodeAsVarULE<VarTupleULE<A, V>> for VarTuple<A, B>
source§fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R
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 moresource§fn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
Return the length, in bytes, of the corresponding
VarULE
typesource§fn encode_var_ule_write(&self, dst: &mut [u8])
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: PartialOrd + AsULE, V: PartialOrd + VarULE + ?Sized> PartialOrd for VarTupleULE<A, V>where
A::ULE: PartialOrd,
impl<A: PartialOrd + AsULE, V: PartialOrd + VarULE + ?Sized> PartialOrd for VarTupleULE<A, V>where
A::ULE: PartialOrd,
source§impl<A, V> Serialize for VarTupleULE<A, V>
impl<A, V> Serialize for VarTupleULE<A, V>
source§impl<A, V> ToOwned for VarTupleULE<A, V>
impl<A, V> ToOwned for VarTupleULE<A, V>
source§type Owned = Box<VarTupleULE<A, V>>
type Owned = Box<VarTupleULE<A, V>>
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> Self::Owned
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)
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>
impl<A, V> VarULE for VarTupleULE<A, V>
source§fn validate_byte_slice(bytes: &[u8]) -> Result<(), UleError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), UleError>
Validates a byte slice,
&[u8]
. Read moresource§unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &Self
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 moresource§fn as_byte_slice(&self) -> &[u8] ⓘ
fn as_byte_slice(&self) -> &[u8] ⓘ
source§impl<'a, A, B, V> ZeroFrom<'a, VarTupleULE<A, V>> for VarTuple<A, B>
impl<'a, A, B, V> ZeroFrom<'a, VarTupleULE<A, V>> for VarTuple<A, B>
source§fn zero_from(other: &'a VarTupleULE<A, V>) -> Self
fn zero_from(other: &'a VarTupleULE<A, V>) -> Self
Clone the other
C
into a struct that may retain references into C
.impl<A: Eq + AsULE, V: Eq + VarULE + ?Sized> Eq for VarTupleULE<A, V>
impl<A: AsULE, V: VarULE + ?Sized> StructuralPartialEq for VarTupleULE<A, V>
Auto Trait Implementations§
impl<A, V> Freeze for VarTupleULE<A, V>
impl<A, V> RefUnwindSafe for VarTupleULE<A, V>
impl<A, V> Send for VarTupleULE<A, V>
impl<A, V> Sync for VarTupleULE<A, V>
impl<A, V> Unpin for VarTupleULE<A, V>
impl<A, V> UnwindSafe for VarTupleULE<A, V>
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> EncodeAsVarULE<T> for T
impl<T> EncodeAsVarULE<T> for T
source§fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
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 moresource§fn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
Return the length, in bytes, of the corresponding
VarULE
typesource§fn encode_var_ule_write(&self, dst: &mut [u8])
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()