pub struct TurboQuantBitWidth(/* private fields */);Expand description
Validated TurboQuant bit width.
Implementations§
Source§impl TurboQuantBitWidth
impl TurboQuantBitWidth
Sourcepub const fn new(bits: u8) -> TurboQuantCodecResult<Self>
pub const fn new(bits: u8) -> TurboQuantCodecResult<Self>
Construct a validated TurboQuant bit width.
§Errors
Returns TurboQuantCodecError::InvalidBitWidth unless bits is in
the inclusive 2..=4 range.
Trait Implementations§
Source§impl Clone for TurboQuantBitWidth
impl Clone for TurboQuantBitWidth
Source§fn clone(&self) -> TurboQuantBitWidth
fn clone(&self) -> TurboQuantBitWidth
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TurboQuantBitWidth
Source§impl Debug for TurboQuantBitWidth
impl Debug for TurboQuantBitWidth
impl Eq for TurboQuantBitWidth
Source§impl From<TurboQuantBitWidth> for u8
impl From<TurboQuantBitWidth> for u8
Source§fn from(value: TurboQuantBitWidth) -> Self
fn from(value: TurboQuantBitWidth) -> Self
Converts to this type from the input type.
Source§impl Hash for TurboQuantBitWidth
impl Hash for TurboQuantBitWidth
Source§impl Ord for TurboQuantBitWidth
impl Ord for TurboQuantBitWidth
Source§fn cmp(&self, other: &TurboQuantBitWidth) -> Ordering
fn cmp(&self, other: &TurboQuantBitWidth) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TurboQuantBitWidth
impl PartialEq for TurboQuantBitWidth
Source§fn eq(&self, other: &TurboQuantBitWidth) -> bool
fn eq(&self, other: &TurboQuantBitWidth) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for TurboQuantBitWidth
impl PartialOrd for TurboQuantBitWidth
impl StructuralPartialEq for TurboQuantBitWidth
Auto Trait Implementations§
impl Freeze for TurboQuantBitWidth
impl RefUnwindSafe for TurboQuantBitWidth
impl Send for TurboQuantBitWidth
impl Sync for TurboQuantBitWidth
impl Unpin for TurboQuantBitWidth
impl UnsafeUnpin for TurboQuantBitWidth
impl UnwindSafe for TurboQuantBitWidth
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.