Struct bit_struct::u58

source ·
pub struct u58(_);
Expand description

An unsigned integer which contains 58 bits

Implementations§

source§

impl u58

source

pub const MAX: u64 = 288_230_376_151_711_743u64

The largest value that can be stored

source

pub const MIN: u64 = 0u64

The smallest value that can be stored

source

pub const unsafe fn new_unchecked(value: u64) -> Self

Create a new u58 from an inner value

This method does not do any checks that the value passed is valid. To check that, use the u58::new function.

Safety

The value must be valid value of the given type.

source

pub fn new(value: u64) -> Option<Self>

Create a new u58 from an inner value

This method checks that the inner value is valid, and return None if it isn’t.

source

pub const fn value(self) -> u64

Get the stored value

Trait Implementations§

source§

impl Add<u58> for u58

§

type Output = u58

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl BitAnd<u58> for u58

§

type Output = u58

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl BitAndAssign<u58> for u58

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl BitCount for u58

source§

const COUNT: usize = 58usize

The number of bits this type takes up

Note that this is the conceptual amount it needs in a bit struct, not the amount it will use as its own variable on the stack.

source§

impl BitOr<u58> for u58

§

type Output = u58

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
source§

impl BitOrAssign<u58> for u58

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl BitXor<u58> for u58

§

type Output = u58

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl BitXorAssign<u58> for u58

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl BitsFitIn<u58> for bool

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i10

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i11

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i12

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i13

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i14

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i15

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i16

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i17

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i18

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i19

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i2

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i20

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i21

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i22

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i23

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i24

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i25

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i26

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i27

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i28

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i29

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i3

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i30

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i31

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i32

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i33

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i34

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i35

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i36

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i37

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i38

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i39

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i4

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i40

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i41

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i42

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i43

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i44

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i45

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i46

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i47

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i48

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i49

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i5

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i50

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i51

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i52

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i53

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i54

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i55

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i56

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i57

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i6

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i7

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i8

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for i9

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u1

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u10

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u11

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u12

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u13

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u14

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u15

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u16

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u17

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u18

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u19

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u2

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u20

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u21

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u22

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u23

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u24

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u25

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u26

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u27

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u28

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u29

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u3

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u30

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u31

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u32

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u33

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u34

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u35

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u36

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u37

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u38

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u39

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u4

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u40

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u41

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u42

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u43

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u44

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u45

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u46

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u47

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u48

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u49

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u5

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u50

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u51

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u52

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u53

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u54

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u55

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u56

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u57

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u58

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u6

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u7

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u8

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u58> for u9

source§

fn fit(self) -> u58

Fits self into the target type
source§

impl BitsFitIn<u59> for u58

source§

fn fit(self) -> u59

Fits self into the target type
source§

impl BitsFitIn<u60> for u58

source§

fn fit(self) -> u60

Fits self into the target type
source§

impl BitsFitIn<u61> for u58

source§

fn fit(self) -> u61

Fits self into the target type
source§

impl BitsFitIn<u62> for u58

source§

fn fit(self) -> u62

Fits self into the target type
source§

impl BitsFitIn<u63> for u58

source§

fn fit(self) -> u63

Fits self into the target type
source§

impl BitsFitIn<u64> for u58

source§

fn fit(self) -> u64

Fits self into the target type
source§

impl Bounded for u58

source§

fn min_value() -> Self

Returns the smallest finite number this type can represent
source§

fn max_value() -> Self

Returns the largest finite number this type can represent
source§

impl Clone for u58

source§

fn clone(&self) -> u58

Returns a copy 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 Debug for u58

source§

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

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

impl Default for u58

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for u58

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for u58

source§

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

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

impl Div<u58> for u58

§

type Output = u58

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl FieldStorage for u58

§

type StoredType = u64

The type this field stores as
source§

fn inner_raw(self) -> Self::StoredType

Get the raw representation of this value
source§

impl FromStr for u58

§

type Err = <u58 as Num>::FromStrRadixErr

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for u58

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 Mul<u58> for u58

§

type Output = u58

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl Num for u58

§

type FromStrRadixErr = ()

source§

fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>

Convert from a string and radix (typically 2..=36). Read more
source§

impl One for u58

source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
source§

fn is_one(&self) -> boolwhere
Self: PartialEq<Self>,

Returns true if self is equal to the multiplicative identity. Read more
source§

impl Ord for u58

source§

fn cmp(&self, other: &u58) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere
Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere
Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<u58> for u58

source§

fn eq(&self, other: &u58) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<u58> for u58

source§

fn partial_cmp(&self, other: &u58) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Rem<u58> for u58

§

type Output = u58

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
source§

impl Serialize for u58

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Shl<usize> for u58

§

type Output = u58

The resulting type after applying the << operator.
source§

fn shl(self, rhs: usize) -> Self::Output

Performs the << operation. Read more
source§

impl ShlAssign<usize> for u58

source§

fn shl_assign(&mut self, rhs: usize)

Performs the <<= operation. Read more
source§

impl Shr<usize> for u58

§

type Output = u58

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: usize) -> Self::Output

Performs the >> operation. Read more
source§

impl ShrAssign<usize> for u58

source§

fn shr_assign(&mut self, rhs: usize)

Performs the >>= operation. Read more
source§

impl Sub<u58> for u58

§

type Output = u58

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl<P> ValidCheck<P> for u58

source§

const ALWAYS_VALID: bool = true

Set this to true if, at compile-time, we can tell that all bit representations which contain the appropriate number of bits are valid representations of this type
source§

fn is_valid(_input: P) -> bool

Return whether or not the underlying bits of P are valid representation of this type
source§

impl Zero for u58

source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
source§

impl Copy for u58

source§

impl Eq for u58

source§

impl StructuralEq for u58

source§

impl StructuralPartialEq for u58

Auto Trait Implementations§

§

impl RefUnwindSafe for u58

§

impl Send for u58

§

impl Sync for u58

§

impl Unpin for u58

§

impl UnwindSafe for u58

Blanket Implementations§

source§

impl<T> Any for Twhere
T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> BitStructZero for Twhere
T: Zero,

source§

fn bs_zero() -> Self

Get a zero value for this bit struct
source§

impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · 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> LowerBounded for Twhere
T: Bounded,

source§

fn min_value() -> T

Returns the smallest finite number this type can represent
source§

impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UpperBounded for Twhere
T: Bounded,

source§

fn max_value() -> T

Returns the largest finite number this type can represent
source§

impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for Twhere
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,