Struct zerovec::ule::tuplevar::Tuple2VarULE

source ·
pub struct Tuple2VarULE<A: ?Sized, B: ?Sized, Format: VarZeroVecFormat = Index16> { /* private fields */ }
Expand description

VarULE type for tuples with 2 elements. See module docs for more information

Implementations§

source§

impl<A: VarULE + ?Sized, B: VarULE + ?Sized, Format: VarZeroVecFormat> Tuple2VarULE<A, B, Format>

source

pub fn a(&self) -> &A

Get field 0of this tuple

source

pub fn b(&self) -> &B

Get field 1of this tuple

Trait Implementations§

source§

impl<A: Debug + VarULE + ?Sized, B: Debug + VarULE + ?Sized, Format: VarZeroVecFormat> Debug for Tuple2VarULE<A, B, Format>

source§

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

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

impl<'a, 'de: 'a, A: VarULE + ?Sized, B: VarULE + ?Sized, Format: VarZeroVecFormat> Deserialize<'de> for &'a Tuple2VarULE<A, B, Format>

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: VarULE + ?Sized, B: VarULE + ?Sized, Format> Deserialize<'de> for Box<Tuple2VarULE<A, B, Format>>
where Box<A>: Deserialize<'de>, Box<B>: Deserialize<'de>, Format: VarZeroVecFormat,

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, AE, BE, Format> EncodeAsVarULE<Tuple2VarULE<A, B, Format>> for (AE, BE)
where A: VarULE + ?Sized, B: VarULE + ?Sized, AE: EncodeAsVarULE<A>, BE: EncodeAsVarULE<B>, Format: VarZeroVecFormat,

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 + VarULE + ?Sized, B: Ord + VarULE + ?Sized, Format: VarZeroVecFormat> Ord for Tuple2VarULE<A, B, Format>

source§

fn cmp(&self, other: &Self) -> Ordering

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

impl<A: PartialEq + VarULE + ?Sized, B: PartialEq + VarULE + ?Sized, Format: VarZeroVecFormat> PartialEq for Tuple2VarULE<A, B, Format>

source§

fn eq(&self, other: &Self) -> 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 + VarULE + ?Sized, B: PartialOrd + VarULE + ?Sized, Format: VarZeroVecFormat> PartialOrd for Tuple2VarULE<A, B, Format>

source§

fn partial_cmp(&self, other: &Self) -> 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, B, Format> Serialize for Tuple2VarULE<A, B, Format>
where A: VarULE + ?Sized + Serialize, B: VarULE + ?Sized + Serialize, for<'a> &'a A: ZeroFrom<'a, A>, for<'a> &'a B: ZeroFrom<'a, B>, Format: VarZeroVecFormat,

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: VarULE + ?Sized, B: VarULE + ?Sized, Format: VarZeroVecFormat> ToOwned for Tuple2VarULE<A, B, Format>

source§

type Owned = Box<Tuple2VarULE<A, B, Format>>

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: VarULE + ?Sized, B: VarULE + ?Sized, Format: VarZeroVecFormat> VarULE for Tuple2VarULE<A, B, Format>

source§

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

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

unsafe fn from_bytes_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_bytes() with success. Read more
source§

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

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

fn as_bytes(&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, AE, BE, Format> ZeroFrom<'a, Tuple2VarULE<A, B, Format>> for (AE, BE)
where A: VarULE + ?Sized, B: VarULE + ?Sized, AE: ZeroFrom<'a, A>, BE: ZeroFrom<'a, B>, Format: VarZeroVecFormat,

source§

fn zero_from(other: &'a Tuple2VarULE<A, B, Format>) -> Self

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

impl<A: Eq + VarULE + ?Sized, B: Eq + VarULE + ?Sized, Format: VarZeroVecFormat> Eq for Tuple2VarULE<A, B, Format>

Auto Trait Implementations§

§

impl<A, B, Format> Freeze for Tuple2VarULE<A, B, Format>
where A: ?Sized, B: ?Sized,

§

impl<A, B, Format> RefUnwindSafe for Tuple2VarULE<A, B, Format>
where A: RefUnwindSafe + ?Sized, B: RefUnwindSafe + ?Sized, Format: RefUnwindSafe,

§

impl<A, B, Format> Send for Tuple2VarULE<A, B, Format>
where A: Send + ?Sized, B: Send + ?Sized, Format: Send,

§

impl<A, B, Format = Index16> !Sized for Tuple2VarULE<A, B, Format>

§

impl<A, B, Format> Sync for Tuple2VarULE<A, B, Format>
where A: Sync + ?Sized, B: Sync + ?Sized, Format: Sync,

§

impl<A, B, Format> Unpin for Tuple2VarULE<A, B, Format>
where A: Unpin + ?Sized, B: Unpin + ?Sized, Format: Unpin,

§

impl<A, B, Format> UnwindSafe for Tuple2VarULE<A, B, Format>
where A: UnwindSafe + ?Sized, B: UnwindSafe + ?Sized, Format: UnwindSafe,

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()