Skip to main content

u104

Struct u104 

Source
pub struct u104(/* private fields */);

Implementations§

Source§

impl u104

Source

pub const BITS: u32 = $bit_count

Source

pub const MIN: Self

Source

pub const MAX: Self

Source

pub const fn new(x: u128) -> Option<Self>

Creates a u104 from a u128, returning None if the value does not fit in 104 bits.

The valid range is MIN..=MAX.

This is the checked counterpart of new_unchecked and new_truncated. It is const, so it can be used to build constants; the type’s constant macro does exactly that and panics at compile time on failure.

§Examples
use nbyte_int::prelude::*;

assert_eq!(u104::new(0).map(|x| x.get()), Some(0));
assert_eq!(u104::new(u104::MAX.get()).map(|x| x.get()), Some(u104::MAX.get()));
// one past the maximum does not fit
assert!(u104::MAX.get().checked_add(1).and_then(u104::new).is_none());
Source

pub const unsafe fn new_unchecked(x: u128) -> Self

Creates a u104 from a u128 without checking that it fits in 104 bits.

Prefer new (checked) or new_truncated (wrapping) unless the range check is provably redundant and measurably matters.

§Safety

x must be within MIN..=MAX, i.e. the value new would accept. Violating this is immediate UB

Source

pub const unsafe fn from_bits(bits: u128) -> Self

Creates a 13-byte integer from its exact raw bit pattern, bypassing all masking.

Unlike new_unchecked, which takes a logical integer value and handles any necessary sign-bit masking, this transmutes the bits directly. Only use it when you already have a pre-masked bit pattern matching the type’s exact internal representation.

§Safety

Only the low 13 bytes of bits may be non-zero. The upper bytes must all be zero. Violating this is immediate undefined behavior (UB).

Source

pub const fn new_truncated(bits: u128) -> Self

Creates a 13-byte integer by truncating the upper bits of the provided value.

This applies a bitmask to clear any bits outside the target bit-width. This behaves identically to primitive narrowing casts (e.g., u32 as u16), where values out of bounds wrap around.

Unlike new, this method will not return None on overflow. Unlike new_unchecked or from_bits, this method is always safe to call with any value because it strictly enforces the memory layout invariants via masking.

Source

pub const fn to_bits(self) -> u128

Returns the raw bit pattern of the 13-byte integer as its underlying backing type.

This returns the exact memory representation of the integer where the upper padding bytes are guaranteed to be zero.

Warning on Signed Integers: This method does not perform sign extension. If you call to_bits() on a negative value, the returned backing primitive will have its upper bytes set to 0, which will change its logical value.

To retrieve the logical value with proper sign extension, always use get instead.

Source

pub const fn swap_bytes(self) -> Self

Source

pub const fn from_le(x: Self) -> Self

Source

pub const fn from_be(x: Self) -> Self

Source

pub const fn to_le(self) -> Self

Source

pub const fn to_be(self) -> Self

Source

pub const fn from_ne_bytes(bytes: [u8; 13]) -> Self

Source

pub const fn from_le_bytes(bytes: [u8; 13]) -> Self

Source

pub const fn from_be_bytes(bytes: [u8; 13]) -> Self

Source

pub const fn to_ne_bytes(self) -> [u8; 13]

Source

pub const fn to_le_bytes(self) -> [u8; 13]

Source

pub const fn to_be_bytes(self) -> [u8; 13]

Source

pub const fn get(self) -> u128

Returns the logical value of the 13-byte integer as its underlying u128 backing type.

For signed integers, this method performs proper sign extension. This ensures that negative values correctly retain their negative logical value when cast up to the wider backing primitive. For unsigned integers, the value is simply zero-extended.

If you need the raw, unextended memory layout (where the upper padding bytes are strictly zeroed out regardless of sign), use to_bits instead.

Source§

impl u104

Source

pub const fn from_str_radix( str: &str, radix: u32, ) -> Result<Self, ParseIntError>

Trait Implementations§

Source§

impl Add for u104

Source§

type Output = u104

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&u104> for u104

Source§

type Output = <u104 as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &u104) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&u104> for &u104

Source§

type Output = <u104 as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &u104) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<u104> for &u104

Source§

type Output = <u104 as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: u104) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for u104

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl AddAssign<&u104> for u104

Source§

fn add_assign(&mut self, other: &u104)

Performs the += operation. Read more
Source§

impl Clone for u104

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for u104

Source§

impl Debug for u104

Source§

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

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

impl Display for u104

Source§

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

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

impl Div for u104

Source§

type Output = u104

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&u104> for u104

Source§

type Output = <u104 as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &u104) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&u104> for &u104

Source§

type Output = <u104 as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &u104) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<u104> for &u104

Source§

type Output = <u104 as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: u104) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign for u104

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl DivAssign<&u104> for u104

Source§

fn div_assign(&mut self, other: &u104)

Performs the /= operation. Read more
Source§

impl Eq for u104

Source§

impl From<u8> for u104

Source§

fn from(x: u8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for u104

Source§

fn from(x: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u24> for u104

Source§

fn from(x: u24) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for u104

Source§

fn from(x: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u40> for u104

Source§

fn from(x: u40) -> Self

Converts to this type from the input type.
Source§

impl From<u48> for u104

Source§

fn from(x: u48) -> Self

Converts to this type from the input type.
Source§

impl From<u56> for u104

Source§

fn from(x: u56) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for u104

Source§

fn from(x: u64) -> Self

Converts to this type from the input type.
Source§

impl From<u72> for u104

Source§

fn from(x: u72) -> Self

Converts to this type from the input type.
Source§

impl From<u80> for u104

Source§

fn from(x: u80) -> Self

Converts to this type from the input type.
Source§

impl From<u88> for u104

Source§

fn from(x: u88) -> Self

Converts to this type from the input type.
Source§

impl From<u96> for u104

Source§

fn from(x: u96) -> Self

Converts to this type from the input type.
Source§

impl From<u104> for u112

Source§

fn from(x: u104) -> Self

Converts to this type from the input type.
Source§

impl From<u104> for i112

Source§

fn from(x: u104) -> Self

Converts to this type from the input type.
Source§

impl From<u104> for u120

Source§

fn from(x: u104) -> Self

Converts to this type from the input type.
Source§

impl From<u104> for i120

Source§

fn from(x: u104) -> Self

Converts to this type from the input type.
Source§

impl From<u104> for u128

Source§

fn from(x: u104) -> Self

Converts to this type from the input type.
Source§

impl From<u104> for i128

Source§

fn from(x: u104) -> Self

Converts to this type from the input type.
Source§

impl FromStr for u104

Source§

type Err = ParseIntError

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 u104

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

fn hash_slice<H: Hasher>(data: &[Self], state: &mut H)
where Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Mul for u104

Source§

type Output = u104

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&u104> for u104

Source§

type Output = <u104 as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u104) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&u104> for &u104

Source§

type Output = <u104 as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u104) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<u104> for &u104

Source§

type Output = <u104 as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: u104) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign for u104

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl MulAssign<&u104> for u104

Source§

fn mul_assign(&mut self, other: &u104)

Performs the *= operation. Read more
Source§

impl Ord for u104

Source§

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

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

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

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for u104

Source§

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

Equality operator ==. Read more
Source§

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

Inequality operator !=. Read more
Source§

impl PartialOrd for u104

Source§

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

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

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

Tests less than (for self and other) and is used by the < operator. Read more
Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Rem for u104

Source§

type Output = u104

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<&u104> for u104

Source§

type Output = <u104 as Rem>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u104) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<&u104> for &u104

Source§

type Output = <u104 as Rem>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u104) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<u104> for &u104

Source§

type Output = <u104 as Rem>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: u104) -> Self::Output

Performs the % operation. Read more
Source§

impl RemAssign for u104

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl RemAssign<&u104> for u104

Source§

fn rem_assign(&mut self, other: &u104)

Performs the %= operation. Read more
Source§

impl Sub for u104

Source§

type Output = u104

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&u104> for u104

Source§

type Output = <u104 as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u104) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&u104> for &u104

Source§

type Output = <u104 as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u104) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<u104> for &u104

Source§

type Output = <u104 as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: u104) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for u104

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl SubAssign<&u104> for u104

Source§

fn sub_assign(&mut self, other: &u104)

Performs the -= operation. Read more
Source§

impl TryFrom<i8> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i8) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i16> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i24> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i24) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i32> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i40> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i40) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i48> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i48) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i56> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i56) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i64> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i64) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i72> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i72) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i80> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i80) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i88> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i88) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i96> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i96) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i104> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i112> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i112) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i120> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i120) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i128> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: i128) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i8

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u8

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i16

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u16

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i24

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u24

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i32

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u32

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i40

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u40

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i48

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u48

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i56

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u56

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i64

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u64

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i72

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u72

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i80

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u80

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i88

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u88

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i96

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for u96

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u104> for i104

Source§

type Error = TryFromIntError

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

fn try_from(x: u104) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u112> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: u112) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u120> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: u120) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u128> for u104

Source§

type Error = TryFromIntError

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

fn try_from(x: u128) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl Freeze for u104

§

impl RefUnwindSafe for u104

§

impl Send for u104

§

impl Sync for u104

§

impl Unpin for u104

§

impl UnsafeUnpin for u104

§

impl UnwindSafe for u104

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.