Struct Fixeds

Source
pub struct Fixeds<const K: u64, CC = u64> {
    pub count: CC,
}
Expand description

An offset container that encodes a constant K spacing.

Fields§

§count: CC

Trait Implementations§

Source§

impl<'a, const K: u64> AsBytes<'a> for Fixeds<K, &'a u64>

Source§

fn as_bytes(&self) -> impl Iterator<Item = (u64, &'a [u8])>

Presents self as a sequence of byte slices, with their required alignment.
Source§

impl<const K: u64> Clear for Fixeds<K>

Source§

fn clear(&mut self)

Clears self, without changing its capacity.
Source§

impl<const K: u64, CC: Clone> Clone for Fixeds<K, CC>

Source§

fn clone(&self) -> Fixeds<K, CC>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<const K: u64> Container for Fixeds<K>

Source§

type Ref<'a> = u64

For each lifetime, a reference with that lifetime. Read more
Source§

type Borrowed<'a> = Fixeds<K, &'a u64>

The type of a borrowed container. Read more
Source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

Converts a reference to the type to a borrowed variant.
Source§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where Self: 'a,

Reborrows the borrowed type to a shorter lifetime. See Columnar::reborrow for details.
Source§

fn reborrow_ref<'b, 'a: 'b>(thing: Self::Ref<'a>) -> Self::Ref<'b>
where Self: 'a,

Reborrows the borrowed type to a shorter lifetime. See Columnar::reborrow for details.
Source§

fn extend_from_self(&mut self, _other: Self::Borrowed<'_>, range: Range<usize>)

Extends self by a range in other. Read more
Source§

fn reserve_for<'a, I>(&mut self, _selves: I)
where Self: 'a, I: Iterator<Item = Self::Borrowed<'a>> + Clone,

Source§

fn with_capacity_for<'a, I>(selves: I) -> Self
where Self: 'a, I: Iterator<Item = Self::Borrowed<'a>> + Clone,

Allocates an empty container that can be extended by selves without reallocation. Read more
Source§

impl<const K: u64, CC: Debug> Debug for Fixeds<K, CC>

Source§

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

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

impl<const K: u64, CC: Default> Default for Fixeds<K, CC>

Source§

fn default() -> Fixeds<K, CC>

Returns the “default value” for a type. Read more
Source§

impl<'a, const K: u64> FromBytes<'a> for Fixeds<K, &'a u64>

Source§

fn from_bytes(bytes: &mut impl Iterator<Item = &'a [u8]>) -> Self

Reconstructs self from a sequence of correctly aligned and sized bytes slices. Read more
Source§

impl<const K: u64> HeapSize for Fixeds<K>

Source§

fn heap_size(&self) -> (usize, usize)

Active (len) and allocated (cap) heap sizes in bytes. This should not include the size of self itself.
Source§

impl<'a, const K: u64, CC> Index for &'a Fixeds<K, CC>

Source§

type Ref = u64

The type returned by the get method. Read more
Source§

fn get(&self, index: usize) -> Self::Ref

Source§

fn last(&self) -> Option<Self::Ref>
where Self: Len,

Source§

fn index_iter(&self) -> IterOwn<&Self>

Converts &self into an iterator. Read more
Source§

fn into_index_iter(self) -> IterOwn<Self>
where Self: Sized,

Converts self into an iterator. Read more
Source§

impl<const K: u64, CC> Index for Fixeds<K, CC>

Source§

type Ref = u64

The type returned by the get method. Read more
Source§

fn get(&self, index: usize) -> Self::Ref

Source§

fn last(&self) -> Option<Self::Ref>
where Self: Len,

Source§

fn index_iter(&self) -> IterOwn<&Self>

Converts &self into an iterator. Read more
Source§

fn into_index_iter(self) -> IterOwn<Self>
where Self: Sized,

Converts self into an iterator. Read more
Source§

impl<const K: u64, CC: CopyAs<u64>> Len for Fixeds<K, CC>

Source§

fn len(&self) -> usize

The number of contained elements.
Source§

fn is_empty(&self) -> bool

Whether this contains no elements.
Source§

impl<'a, const K: u64, T> Push<T> for Fixeds<K>

Source§

fn push(&mut self, _item: T)

Pushes an item onto self.
Source§

fn extend(&mut self, iter: impl IntoIterator<Item = T>)

Pushes elements of an iterator onto self.
Source§

impl<const K: u64, BC: Len, CC: CopyAs<u64>> TryFrom<Strides<BC, CC>> for Fixeds<K, CC>

Source§

type Error = Strides<BC, CC>

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

fn try_from(item: Strides<BC, CC>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const K: u64, CC: Copy> Copy for Fixeds<K, CC>

Auto Trait Implementations§

§

impl<const K: u64, CC> Freeze for Fixeds<K, CC>
where CC: Freeze,

§

impl<const K: u64, CC> RefUnwindSafe for Fixeds<K, CC>
where CC: RefUnwindSafe,

§

impl<const K: u64, CC> Send for Fixeds<K, CC>
where CC: Send,

§

impl<const K: u64, CC> Sync for Fixeds<K, CC>
where CC: Sync,

§

impl<const K: u64, CC> Unpin for Fixeds<K, CC>
where CC: Unpin,

§

impl<const K: u64, CC> UnwindSafe for Fixeds<K, CC>
where CC: 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> CopyAs<T> for T
where T: Copy,

Source§

fn copy_as(self) -> T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, S> IndexAs<S> for T
where T: Index, <T as Index>::Ref: CopyAs<S>,

Source§

fn index_as(&self, index: usize) -> S

Source§

fn last(&self) -> Option<T>
where Self: Len,

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.