Skip to main content

SizedVec

Struct SizedVec 

Source
pub struct SizedVec<T, Q>(/* private fields */);
Expand description

A vec with it’s length queried from a reader.

Trait Implementations§

Source§

impl<T: Clone, Q: Clone> Clone for SizedVec<T, Q>

Source§

fn clone(&self) -> SizedVec<T, Q>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, Q: Debug> Debug for SizedVec<T, Q>

Source§

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

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

impl<T: Eq, Q: Eq> Eq for SizedVec<T, Q>

Source§

impl<T, Q> From<SizedVec<T, Q>> for Vec<T>

Source§

fn from(value: SizedVec<T, Q>) -> Self

Converts to this type from the input type.
Source§

impl<'input, T, Q, E> FromByteReader<'input> for SizedVec<T, Q>
where T: FromByteReader<'input, Err = E>, Q: VecLenQuery + 'static, E: From<Error>,

Source§

type Err = E

Error type returned when parsing bytes fails.
Source§

fn from_byte_reader<R>(reader: R) -> Result<Self, Self::Err>
where R: ByteRead<'input>,

Read Self from a ByteRead. Read more
Source§

impl<T: Hash, Q: Hash> Hash for SizedVec<T, Q>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T: PartialEq, Q: PartialEq> PartialEq for SizedVec<T, Q>

Source§

fn eq(&self, other: &SizedVec<T, Q>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl<T: PartialEq, Q: PartialEq> StructuralPartialEq for SizedVec<T, Q>

Auto Trait Implementations§

§

impl<T, Q> Freeze for SizedVec<T, Q>

§

impl<T, Q> RefUnwindSafe for SizedVec<T, Q>

§

impl<T, Q> Send for SizedVec<T, Q>
where Q: Send, T: Send,

§

impl<T, Q> Sync for SizedVec<T, Q>
where Q: Sync, T: Sync,

§

impl<T, Q> Unpin for SizedVec<T, Q>
where Q: Unpin, T: Unpin,

§

impl<T, Q> UnsafeUnpin for SizedVec<T, Q>

§

impl<T, Q> UnwindSafe for SizedVec<T, Q>
where Q: UnwindSafe, T: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'input, T, E, F> FromByteReaderWith<'input, Fn<F>> for T
where F: FnOnce() -> Result<T, E>,

Source§

type Err = E

Error type returned when parsing fails.
Source§

fn from_byte_reader_with<R>( _reader: R, with: Fn<F>, ) -> Result<T, <T as FromByteReaderWith<'input, Fn<F>>>::Err>
where R: ByteRead<'input>,

Read Self from a ByteRead and some other value. Read more
Source§

impl<'input, T> FromByteReaderWith<'input, Value<T>> for T

Source§

type Err = Error

Error type returned when parsing fails.
Source§

fn from_byte_reader_with<R>( _reader: R, with: Value<T>, ) -> Result<T, <T as FromByteReaderWith<'input, Value<T>>>::Err>
where R: ByteRead<'input>,

Read Self from a ByteRead and some other value. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.