U256Wrapper

Struct U256Wrapper 

Source
pub struct U256Wrapper(pub Uint<256, 4>);
Expand description

A wrapper around U256 to represent a field element in the protocol. Wrapper enables FFI interoperability.

Most inputs and outputs from the zero-knowledge proofs are U256 values. While using U256 directly is convenient and recommended when working with the proofs, particularly in Rust, it is not a user-friendly type for interactions or communications in other languages / systems.

Particularly, when sending proof inputs/outputs as JSON on HTTP requests, the values SHOULD be represented as padded hex strings from Big Endian bytes.

Tuple Fields§

§0: Uint<256, 4>

Implementations§

Source§

impl U256Wrapper

Source

pub fn to_hex_string(&self) -> String

Outputs a hex string representation of the U256 value padded to 32 bytes (plus two bytes for the 0x prefix).

Source

pub fn try_from_hex_string( hex_string: &str, ) -> Result<U256Wrapper, WalletKitError>

Attempts to parse a hex string as a U256 value (wrapped).

§Errors

Will return an Error::InvalidNumber if the input is not a valid hex-string-presented number up to 256 bits.

Source

pub fn from_u64(value: u64) -> U256Wrapper

Creates a U256 value from a u64 value.

Logically this will only support values up to 64 bits. For larger values a different initialization should be used.

Source

pub fn from_u32(value: u32) -> U256Wrapper

Creates a U256 value from a u32 value.

Logically this will only support values up to 32 bits. For larger values a different initialization should be used.

Source

pub fn from_limbs(limbs: Vec<u64>) -> Result<U256Wrapper, WalletKitError>

Creates a U256 value from an array of 4 u64 values (little-endian). Least significant limb first.

This is the same as the U256::from_limbs method, but exposed to foreign bindings.

§Errors

Will return an Error::InvalidNumber if the input is not a valid U256 value.

Source

pub fn into_limbs(self) -> Vec<u64>

Converts the U256 value into a vector of 4 u64 values (little-endian). Least significant limb first.

Using a vector as an array cannot be lowered to foreign bindings.

Methods from Deref<Target = Uint<256, 4>>§

Source

pub fn to_base_le(&self, base: u64) -> impl Iterator<Item = u64>

Returns an iterator over the base base digits of the number in little-endian order.

Pro tip: instead of setting base = 10, set it to the highest power of 10 that still fits u64. This way much fewer iterations are required to extract all the digits.

§Panics

Panics if the base is less than 2.

Source

pub fn to_base_be(&self, base: u64) -> impl Iterator<Item = u64>

Returns an iterator over the base base digits of the number in big-endian order.

Pro tip: instead of setting base = 10, set it to the highest power of 10 that still fits u64. This way much fewer iterations are required to extract all the digits.

§Panics

Panics if the base is less than 2.

Source

pub fn bit(&self, index: usize) -> bool

Returns whether a specific bit is set.

Returns false if index exceeds the bit width of the number.

Source

pub fn byte(&self, index: usize) -> u8

Returns a specific byte. The byte at index 0 is the least significant byte (little endian).

§Panics

Panics if index is greater than or equal to the byte width of the number.

§Examples
let x = uint!(0x1234567890_U64);
let bytes = [
    x.byte(0), // 0x90
    x.byte(1), // 0x78
    x.byte(2), // 0x56
    x.byte(3), // 0x34
    x.byte(4), // 0x12
    x.byte(5), // 0x00
    x.byte(6), // 0x00
    x.byte(7), // 0x00
];
assert_eq!(bytes, x.to_le_bytes());

Panics if out of range.

let x = uint!(0x1234567890_U64);
let _ = x.byte(8);
Source

pub fn checked_byte(&self, index: usize) -> Option<u8>

Returns a specific byte, or None if index is out of range. The byte at index 0 is the least significant byte (little endian).

§Examples
let x = uint!(0x1234567890_U64);
assert_eq!(x.checked_byte(0), Some(0x90));
assert_eq!(x.checked_byte(7), Some(0x00));
// Out of range
assert_eq!(x.checked_byte(8), None);
Source

pub fn leading_zeros(&self) -> usize

Returns the number of leading zeros in the binary representation of self.

Source

pub fn leading_ones(&self) -> usize

Returns the number of leading ones in the binary representation of self.

Source

pub fn trailing_zeros(&self) -> usize

Returns the number of trailing zeros in the binary representation of self.

Source

pub fn trailing_ones(&self) -> usize

Returns the number of trailing ones in the binary representation of self.

Source

pub fn count_ones(&self) -> usize

Returns the number of ones in the binary representation of self.

Source

pub fn count_zeros(&self) -> usize

Returns the number of zeros in the binary representation of self.

Source

pub fn bit_len(&self) -> usize

Returns the dynamic length of this number in bits, ignoring leading zeros.

For the maximum length of the type, use Uint::BITS.

Source

pub fn byte_len(&self) -> usize

Returns the dynamic length of this number in bytes, ignoring leading zeros.

For the maximum length of the type, use Uint::BYTES.

Source

pub fn most_significant_bits(&self) -> (u64, usize)

Returns the most significant 64 bits of the number and the exponent.

Given return value $(\mathtt{bits}, \mathtt{exponent})$, the self can be approximated as

$$ \mathtt{self} ≈ \mathtt{bits} ⋅ 2^\mathtt{exponent} $$

If self is $<≥> 2^{63}$, then exponent will be zero and bits will have leading zeros.

Source

pub const BYTES: usize

Source

pub fn as_le_slice(&self) -> &[u8]

Access the underlying store as a little-endian slice of bytes.

Only available on little-endian targets.

If BITS does not evenly divide 8, it is padded with zero bits in the most significant position.

Source

pub fn as_le_bytes(&self) -> Cow<'_, [u8]>

Access the underlying store as a little-endian bytes.

Uses an optimized implementation on little-endian targets.

Source

pub fn as_le_bytes_trimmed(&self) -> Cow<'_, [u8]>

Access the underlying store as a little-endian bytes with trailing zeros removed.

Uses an optimized implementation on little-endian targets.

Source

pub fn to_le_bytes<const BYTES: usize>(&self) -> [u8; BYTES]

Converts the Uint to a little-endian byte array of size exactly Self::BYTES.

§Panics

Panics if the generic parameter BYTES is not exactly Self::BYTES. Ideally this would be a compile time error, but this is blocked by Rust issue #60551.

Source

pub fn to_le_bytes_vec(&self) -> Vec<u8>

Converts the Uint to a little-endian byte vector of size exactly Self::BYTES.

This method is useful when Self::to_le_bytes can not be used because byte size is not known compile time.

Source

pub fn to_le_bytes_trimmed_vec(&self) -> Vec<u8>

Converts the Uint to a little-endian byte vector with trailing zeros bytes removed.

Source

pub fn to_be_bytes<const BYTES: usize>(&self) -> [u8; BYTES]

Converts the Uint to a big-endian byte array of size exactly Self::BYTES.

§Panics

Panics if the generic parameter BYTES is not exactly Self::BYTES. Ideally this would be a compile time error, but this is blocked by Rust issue #60551.

Source

pub fn to_be_bytes_vec(&self) -> Vec<u8>

Converts the Uint to a big-endian byte vector of size exactly Self::BYTES.

This method is useful when Self::to_be_bytes can not be used because byte size is not known compile time.

Source

pub fn to_be_bytes_trimmed_vec(&self) -> Vec<u8>

Converts the Uint to a big-endian byte vector with leading zeros bytes removed.

Source

pub fn copy_le_bytes_to(&self, buf: &mut [u8]) -> usize

Writes the little-endian representation of the Uint to the given buffer. The buffer must be large enough to hold Self::BYTES bytes.

§Panics

Panics if the buffer is not large enough to hold Self::BYTES bytes.

§Returns

The number of bytes written to the buffer (always equal to Self::BYTES, but often useful to make explicit for encoders).

Source

pub fn checked_copy_le_bytes_to(&self, buf: &mut [u8]) -> Option<usize>

Writes the little-endian representation of the Uint to the given buffer. The buffer must be large enough to hold Self::BYTES bytes.

§Returns

None, if the buffer is not large enough to hold Self::BYTES bytes, and does not modify the buffer.

Some with the number of bytes written to the buffer (always equal to Self::BYTES, but often useful to make explicit for encoders).

Source

pub fn copy_be_bytes_to(&self, buf: &mut [u8]) -> usize

Writes the big-endian representation of the Uint to the given buffer. The buffer must be large enough to hold Self::BYTES bytes.

§Panics

Panics if the buffer is not large enough to hold Self::BYTES bytes.

§Returns

The number of bytes written to the buffer (always equal to Self::BYTES, but often useful to make explicit for encoders).

Source

pub fn checked_copy_be_bytes_to(&self, buf: &mut [u8]) -> Option<usize>

Writes the big-endian representation of the Uint to the given buffer. The buffer must be large enough to hold Self::BYTES bytes.

§Returns

None, if the buffer is not large enough to hold Self::BYTES bytes, and does not modify the buffer.

Some with the number of bytes written to the buffer (always equal to Self::BYTES, but often useful to make explicit for encoders).

Source

pub fn is_zero(&self) -> bool

Returns true if the value is zero.

Source

pub fn const_is_zero(&self) -> bool

Returns true if the value is zero.

Note that this currently might perform worse than is_zero.

Source

pub fn const_eq(&self, other: &Uint<BITS, LIMBS>) -> bool

Returns true if self equals other.

Note that this currently might perform worse than the derived PartialEq (== operator).

Source

pub fn to<T>(&self) -> T
where Uint<BITS, LIMBS>: UintTryTo<T>, T: Debug,

§Panics

Panics if the conversion fails, for example if the value is too large for the bit-size of the target type.

§Examples
assert_eq!(300_U12.to::<i16>(), 300_i16);
assert_eq!(300_U12.to::<U256>(), 300_U256);
Source

pub fn wrapping_to<T>(&self) -> T
where Uint<BITS, LIMBS>: UintTryTo<T>,

§Examples
assert_eq!(300_U12.wrapping_to::<i8>(), 44_i8);
assert_eq!(255_U32.wrapping_to::<i8>(), -1_i8);
assert_eq!(0x1337cafec0d3_U256.wrapping_to::<U32>(), 0xcafec0d3_U32);
Source

pub fn saturating_to<T>(&self) -> T
where Uint<BITS, LIMBS>: UintTryTo<T>,

§Examples
assert_eq!(300_U12.saturating_to::<i16>(), 300_i16);
assert_eq!(255_U32.saturating_to::<i8>(), 127);
assert_eq!(0x1337cafec0d3_U256.saturating_to::<U32>(), U32::MAX);
Source

pub const LIMBS: usize

Source

pub const MASK: u64

Source

pub const BITS: usize = BITS

Source

pub const ZERO: Uint<BITS, LIMBS>

Source

pub const ONE: Uint<BITS, LIMBS>

Source

pub const MIN: Uint<BITS, LIMBS> = Self::ZERO

Source

pub const MAX: Uint<BITS, LIMBS>

Source

pub fn as_limbs(&self) -> &[u64; LIMBS]

View the array of limbs.

Trait Implementations§

Source§

impl Clone for U256Wrapper

Source§

fn clone(&self) -> U256Wrapper

Returns a duplicate 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 U256Wrapper

Source§

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

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

impl Deref for U256Wrapper

Source§

type Target = Uint<256, 4>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<U256Wrapper as Deref>::Target

Dereferences the value.
Source§

impl<'de> Deserialize<'de> for U256Wrapper

Source§

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

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

impl Display for U256Wrapper

Source§

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

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

impl From<U256Wrapper> for Uint<256, 4>

Source§

fn from(val: U256Wrapper) -> Uint<256, 4>

Converts to this type from the input type.
Source§

impl From<Uint<256, 4>> for U256Wrapper

Source§

fn from(val: Uint<256, 4>) -> U256Wrapper

Converts to this type from the input type.
Source§

impl PartialEq for U256Wrapper

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for U256Wrapper

Source§

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

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

impl Copy for U256Wrapper

Source§

impl Eq for U256Wrapper

Source§

impl StructuralPartialEq for U256Wrapper

Auto Trait Implementations§

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SectionExt for T
where T: Display + Send + Sync + 'static,

Source§

fn header<C>(self, header: C) -> IndentedSection<C, T>
where C: Display + Send + Sync + 'static,

Add a header to a Section and indent the body Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

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

Source§

type Error = Infallible

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

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

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T