[−][src]Struct enum_vec::PackedU16
Packs an EnumLike value into a u16, if possible
Methods
impl<T> PackedU16<T> where
T: EnumLike, [src]
impl<T> PackedU16<T> where
T: EnumLike, pub fn new(a: T) -> PackedU16<T>[src]
pub fn new(a: T) -> PackedU16<T>Packs T into 16 bits. If it is not possible, error at compile time.
pub fn value(&self) -> T[src]
pub fn value(&self) -> TReturn the packed value
Trait Implementations
impl<T> PartialEq<PackedU16<T>> for PackedU16<T> where
T: PartialEq<T>, [src]
impl<T> PartialEq<PackedU16<T>> for PackedU16<T> where
T: PartialEq<T>, impl<T> Clone for PackedU16<T> where
T: Clone, [src]
impl<T> Clone for PackedU16<T> where
T: Clone, fn clone(&self) -> PackedU16<T>[src]
fn clone(&self) -> PackedU16<T>fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<T> Ord for PackedU16<T> where
T: Ord, [src]
impl<T> Ord for PackedU16<T> where
T: Ord, fn cmp(&self, other: &PackedU16<T>) -> Ordering[src]
fn cmp(&self, other: &PackedU16<T>) -> Orderingfn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> Self1.21.0
[src]Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> Self1.21.0
[src]Compares and returns the minimum of two values. Read more
impl<T> PartialOrd<PackedU16<T>> for PackedU16<T> where
T: PartialOrd<T>, [src]
impl<T> PartialOrd<PackedU16<T>> for PackedU16<T> where
T: PartialOrd<T>, fn partial_cmp(&self, other: &PackedU16<T>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &PackedU16<T>) -> Option<Ordering>fn lt(&self, other: &PackedU16<T>) -> bool[src]
fn lt(&self, other: &PackedU16<T>) -> boolfn le(&self, other: &PackedU16<T>) -> bool[src]
fn le(&self, other: &PackedU16<T>) -> boolfn gt(&self, other: &PackedU16<T>) -> bool[src]
fn gt(&self, other: &PackedU16<T>) -> boolfn ge(&self, other: &PackedU16<T>) -> bool[src]
fn ge(&self, other: &PackedU16<T>) -> boolimpl<T> Copy for PackedU16<T> where
T: Copy, [src]
impl<T> Copy for PackedU16<T> where
T: Copy, impl<T> Hash for PackedU16<T> where
T: Hash, [src]
impl<T> Hash for PackedU16<T> where
T: Hash, fn hash<__HT>(&self, state: &mut __HT) where
__HT: Hasher, [src]
fn hash<__HT>(&self, state: &mut __HT) where
__HT: Hasher, fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
[src]Feeds a slice of this type into the given [Hasher]. Read more
impl<T> Eq for PackedU16<T> where
T: Eq, [src]
impl<T> Eq for PackedU16<T> where
T: Eq, impl<T> Debug for PackedU16<T> where
T: Debug, [src]
impl<T> Debug for PackedU16<T> where
T: Debug, Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut T