pub struct Unsigned6Bit {
pub(crate) bits: u8,
}
Expand description
Unsigned6Bit
is used as an X-register address. That is, the j
in Xj
.
Fields§
§bits: u8
Implementations§
Source§impl Unsigned6Bit
impl Unsigned6Bit
const MODULUS: u8 = 64u8
const VALUE_BITS: u8 = 63u8
pub const MAX: Self
pub const ZERO: Self
pub const ONE: Self
pub const MIN: Self = Self::ZERO
pub const fn new<const N: u8>() -> Unsigned6Bit
pub const fn is_zero(&self) -> bool
pub const fn is_negative(&self) -> bool
pub const fn is_positive(&self) -> bool
pub const fn reinterpret_as_signed(&self) -> Signed6Bit
pub fn wrapping_add(self, rhs: Unsigned6Bit) -> Unsigned6Bit
pub fn wrapping_sub(self, rhs: Unsigned6Bit) -> Unsigned6Bit
pub fn checked_add(self, rhs: Unsigned6Bit) -> Option<Unsigned6Bit>
pub fn checked_sub(self, rhs: Unsigned6Bit) -> Option<Unsigned6Bit>
pub fn wrapping_mul(self, rhs: Unsigned6Bit) -> Unsigned6Bit
pub fn checked_mul(self, rhs: Unsigned6Bit) -> Option<Unsigned6Bit>
pub fn checked_div(self, rhs: Unsigned6Bit) -> Option<Unsigned6Bit>
pub const fn abs(self) -> Self
pub const fn overflowing_abs(self) -> (Self, bool)
pub const fn and(self, mask: u8) -> Self
pub const fn bitor(self, mask: u8) -> Self
Trait Implementations§
Source§impl BitAnd<Unsigned6Bit> for Unsigned36Bit
impl BitAnd<Unsigned6Bit> for Unsigned36Bit
Source§type Output = Unsigned6Bit
type Output = Unsigned6Bit
The resulting type after applying the
&
operator.Source§fn bitand(self, rhs: Unsigned6Bit) -> Unsigned6Bit
fn bitand(self, rhs: Unsigned6Bit) -> Unsigned6Bit
Performs the
&
operation. Read moreSource§impl BitAnd<u8> for Unsigned6Bit
impl BitAnd<u8> for Unsigned6Bit
Source§impl BitAnd for Unsigned6Bit
impl BitAnd for Unsigned6Bit
Source§impl BitOr<u8> for Unsigned6Bit
impl BitOr<u8> for Unsigned6Bit
Source§impl BitOr for Unsigned6Bit
impl BitOr for Unsigned6Bit
Source§impl BitXor<u8> for Unsigned6Bit
impl BitXor<u8> for Unsigned6Bit
Source§impl BitXor for Unsigned6Bit
impl BitXor for Unsigned6Bit
Source§impl Clone for Unsigned6Bit
impl Clone for Unsigned6Bit
Source§fn clone(&self) -> Unsigned6Bit
fn clone(&self) -> Unsigned6Bit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Unsigned6Bit
impl Debug for Unsigned6Bit
Source§impl Default for Unsigned6Bit
impl Default for Unsigned6Bit
Source§impl Display for Unsigned6Bit
impl Display for Unsigned6Bit
Source§impl From<Unsigned5Bit> for Unsigned6Bit
impl From<Unsigned5Bit> for Unsigned6Bit
Source§fn from(n: Unsigned5Bit) -> Self
fn from(n: Unsigned5Bit) -> Self
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for Unsigned12Bit
impl From<Unsigned6Bit> for Unsigned12Bit
Source§fn from(n: Unsigned6Bit) -> Self
fn from(n: Unsigned6Bit) -> Self
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for Unsigned36Bit
impl From<Unsigned6Bit> for Unsigned36Bit
Source§fn from(n: Unsigned6Bit) -> Self
fn from(n: Unsigned6Bit) -> Self
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for Unsigned9Bit
impl From<Unsigned6Bit> for Unsigned9Bit
Source§fn from(n: Unsigned6Bit) -> Self
fn from(n: Unsigned6Bit) -> Self
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for i16
impl From<Unsigned6Bit> for i16
Source§fn from(n: Unsigned6Bit) -> i16
fn from(n: Unsigned6Bit) -> i16
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for i32
impl From<Unsigned6Bit> for i32
Source§fn from(n: Unsigned6Bit) -> i32
fn from(n: Unsigned6Bit) -> i32
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for i64
impl From<Unsigned6Bit> for i64
Source§fn from(n: Unsigned6Bit) -> i64
fn from(n: Unsigned6Bit) -> i64
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for i8
impl From<Unsigned6Bit> for i8
Source§fn from(n: Unsigned6Bit) -> i8
fn from(n: Unsigned6Bit) -> i8
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for isize
impl From<Unsigned6Bit> for isize
Source§fn from(n: Unsigned6Bit) -> isize
fn from(n: Unsigned6Bit) -> isize
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for u16
impl From<Unsigned6Bit> for u16
Source§fn from(n: Unsigned6Bit) -> u16
fn from(n: Unsigned6Bit) -> u16
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for u32
impl From<Unsigned6Bit> for u32
Source§fn from(n: Unsigned6Bit) -> u32
fn from(n: Unsigned6Bit) -> u32
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for u64
impl From<Unsigned6Bit> for u64
Source§fn from(n: Unsigned6Bit) -> u64
fn from(n: Unsigned6Bit) -> u64
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for u8
impl From<Unsigned6Bit> for u8
Source§fn from(n: Unsigned6Bit) -> u8
fn from(n: Unsigned6Bit) -> u8
Converts to this type from the input type.
Source§impl From<Unsigned6Bit> for usize
impl From<Unsigned6Bit> for usize
Source§fn from(n: Unsigned6Bit) -> usize
fn from(n: Unsigned6Bit) -> usize
Converts to this type from the input type.
Source§impl Hash for Unsigned6Bit
impl Hash for Unsigned6Bit
Source§impl Not for Unsigned6Bit
impl Not for Unsigned6Bit
Source§impl Octal for Unsigned6Bit
impl Octal for Unsigned6Bit
Source§impl Ord for Unsigned6Bit
impl Ord for Unsigned6Bit
Source§fn cmp(&self, other: &Unsigned6Bit) -> Ordering
fn cmp(&self, other: &Unsigned6Bit) -> Ordering
1.21.0 · 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<T> PartialEq<T> for Unsigned6Bit
impl<T> PartialEq<T> for Unsigned6Bit
Source§impl PartialOrd<u32> for Unsigned6Bit
impl PartialOrd<u32> for Unsigned6Bit
Source§impl PartialOrd<u64> for Unsigned6Bit
impl PartialOrd<u64> for Unsigned6Bit
Source§impl PartialOrd for Unsigned6Bit
impl PartialOrd for Unsigned6Bit
Source§impl Serialize for Unsigned6Bit
impl Serialize for Unsigned6Bit
Source§impl Shl<u32> for Unsigned6Bit
impl Shl<u32> for Unsigned6Bit
Source§impl Shl for Unsigned6Bit
impl Shl for Unsigned6Bit
Source§type Output = Unsigned6Bit
type Output = Unsigned6Bit
The resulting type after applying the
<<
operator.Source§fn shl(self, shift_by: Unsigned6Bit) -> Self
fn shl(self, shift_by: Unsigned6Bit) -> Self
Performs the
<<
operation. Read moreSource§impl Shr<u32> for Unsigned6Bit
impl Shr<u32> for Unsigned6Bit
Source§impl Shr for Unsigned6Bit
impl Shr for Unsigned6Bit
Source§impl Sum for Unsigned6Bit
impl Sum for Unsigned6Bit
Source§impl TryFrom<Unsigned18Bit> for Unsigned6Bit
impl TryFrom<Unsigned18Bit> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned18Bit) -> Result<Self, ConversionFailed>
fn try_from(n: Unsigned18Bit) -> Result<Self, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<Unsigned36Bit> for Unsigned6Bit
impl TryFrom<Unsigned36Bit> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§fn try_from(n: Unsigned36Bit) -> Result<Self, ConversionFailed>
fn try_from(n: Unsigned36Bit) -> Result<Self, ConversionFailed>
Performs the conversion.
Source§impl TryFrom<i16> for Unsigned6Bit
impl TryFrom<i16> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<i32> for Unsigned6Bit
impl TryFrom<i32> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<i64> for Unsigned6Bit
impl TryFrom<i64> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<i8> for Unsigned6Bit
impl TryFrom<i8> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<isize> for Unsigned6Bit
impl TryFrom<isize> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<u16> for Unsigned6Bit
impl TryFrom<u16> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<u32> for Unsigned6Bit
impl TryFrom<u32> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<u64> for Unsigned6Bit
impl TryFrom<u64> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<u8> for Unsigned6Bit
impl TryFrom<u8> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl TryFrom<usize> for Unsigned6Bit
impl TryFrom<usize> for Unsigned6Bit
Source§type Error = ConversionFailed
type Error = ConversionFailed
The type returned in the event of a conversion error.
Source§impl WordCommon for Unsigned6Bit
impl WordCommon for Unsigned6Bit
impl Copy for Unsigned6Bit
impl Eq for Unsigned6Bit
Auto Trait Implementations§
impl Freeze for Unsigned6Bit
impl RefUnwindSafe for Unsigned6Bit
impl Send for Unsigned6Bit
impl Sync for Unsigned6Bit
impl Unpin for Unsigned6Bit
impl UnwindSafe for Unsigned6Bit
Blanket Implementations§
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.