Struct IAdic

Source
pub struct IAdic { /* private fields */ }
Expand description

Adic that represents a signed integer (iadic_pos, iadic_neg)

An AdicInteger. This can represent any real, signed integer. The struct holds a finite list of digits, from the “zero” digit place to the max. After this, it holds either all zeros or all (p-1)s, aka -1 in F_p. This second-most basic Adic struct, has a finite number of digits and a sign. With this, you can represent exactly the real integers.

assert_eq!("4321._5", IAdic::new_pos(5, vec![1, 2, 3, 4]).to_string());
let two = IAdic::new_pos(5, vec![2]);
assert_eq!(2, two.i32_value());
let neg_two = IAdic::new_neg(5, vec![3]);
assert_eq!("(4)3._5", neg_two.to_string());
assert_eq!(-2, neg_two.i32_value());
assert!((two + neg_two).is_zero());

This representation EXACTLY matches the real number base-p digits for a positive real integer. 2 = 2._5, 123 (base 5) = 123._5 You can perform the same arithmetic on these numbers. However, as a signed number, we can also represent negative numbers. -2 = (4)3._5 = ...4443._5, -123 (base 5) = (4)322._5

These numbers can be subtracted but not divided. Instead, look to rationals, RAdic, or if they can be approximate, ZAdic.

ZAdic internally uses IAdic for the exact case.

Implementations§

Source§

impl IAdic

Source

pub fn new<P>(p: P, init_digits: Vec<u32>, sign: Sign) -> Self
where P: Into<Prime>,

Create an adic number with the given digits and sign

§Panics

Panics if p is not prime or digits are outside of [0, p)

Source

pub fn new_pos<P>(p: P, init_digits: Vec<u32>) -> Self
where P: Into<Prime>,

Create a positive adic number with the given digits

§Panics

Panics if p is not prime or digits are outside of [0, p)

Source

pub fn new_neg<P>(p: P, init_digits: Vec<u32>) -> Self
where P: Into<Prime>,

Create a negative adic number with the given digits

§Panics

Panics if p is not prime or digits are outside of [0, p)

Source

pub fn into_abs(self) -> UAdic

Consume IAdic and get the real absolute value UAdic

let i = iadic_pos!(5, [1, 2, 3, 4, 0]);
assert_eq!(uadic!(5, [1, 2, 3, 4]), i.into_abs());
let i = iadic_neg!(5, [1, 2, 3, 4, 0]);
assert_eq!(uadic!(5, [4, 2, 1, 0, 4]), i.into_abs());
Source

pub fn abs(&self) -> UAdic

Real absolute value UAdic

let i = iadic_pos!(5, [1, 2, 3, 4, 0]);
assert_eq!(uadic!(5, [1, 2, 3, 4]), i.abs());
let i = iadic_neg!(5, [1, 2, 3, 4, 0]);
assert_eq!(uadic!(5, [4, 2, 1, 0, 4]), i.abs());
Source

pub fn is_non_negative(&self) -> bool

Does the IAdic repesent a non-negative integer

Source

pub fn num_non_trailing(&self) -> usize

Number of non-trailing digits

assert_eq!(2, iadic_pos!(5, [2, 4, 0]).num_non_trailing());
assert_eq!(1, iadic_neg!(5, [2, 4, 4]).num_non_trailing());
Source

pub fn trailing_digit(&self) -> u32

Trailing digit for IAdic, either 0 or (p-1)

assert_eq!(0, iadic_pos!(5, [4, 2]).trailing_digit());
assert_eq!(4, iadic_neg!(5, [4, 2]).trailing_digit());
Source

pub fn i32_value(&self) -> i32

The natural number value of the number, e.g. 5-adic 123 is 25+10+3=38

Warning: This can overflow; use signed_bigint_value if unsure

§Panics

Panics if u32 -> i32 conversion fails

assert_eq!(38, iadic_pos!(5, [3, 2, 1]).i32_value());
assert_eq!(-38, iadic_neg!(5, [2, 2, 3]).i32_value());
Source

pub fn signed_bigint_value(&self) -> BigInt

The bigint representation for the natural number value of the number (i32_value)

assert_eq!(BigInt::from(38), iadic_pos!(5, [3, 2, 1]).signed_bigint_value());
assert_eq!(BigInt::from(-38), iadic_neg!(5, [2, 2, 3]).signed_bigint_value());

Trait Implementations§

Source§

impl Add<&IAdic> for &IAdic

Source§

type Output = IAdic

The resulting type after applying the + operator.
Source§

fn add(self, b: &IAdic) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&IAdic> for IAdic

Source§

type Output = IAdic

The resulting type after applying the + operator.
Source§

fn add(self, b: &IAdic) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<IAdic> for &IAdic

Source§

type Output = IAdic

The resulting type after applying the + operator.
Source§

fn add(self, b: IAdic) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for IAdic

Source§

type Output = IAdic

The resulting type after applying the + operator.
Source§

fn add(self, b: IAdic) -> Self::Output

Performs the + operation. Read more
Source§

impl AdicApproximate for IAdic

Source§

fn certainty(&self) -> AdicValuation<Self::DigitIndex>

The adic valuation of the first unknown digit for this number: v(...0021.30_5) = 4 Read more
Source§

fn has_no_certainty(&self) -> bool

The adic is completely uncertain, has no known digits Read more
Source§

fn is_certain(&self) -> bool

Test if adic number is completely known Read more
Source§

fn significance(&self) -> AdicValuation<Self::ValuationRing>
where Self: AdicSized<ValuationRing = Self::DigitIndex>, Self::ValuationRing: Sub<Output = Self::ValuationRing>,

The digital distance between valuation and certainty. Read more
Source§

impl AdicInteger for IAdic

Source§

fn digit_str(&self) -> String

A string representing the digits of this adic number; used to Display the integer. Read more
Source§

fn into_split(self, n: usize) -> (UAdic, Self)

Split adic into digits [0, n) and [n, …). This splits the number into remainder and quotient. See also: split Read more
Source§

fn p_power<P, I>(p: P, n: I) -> Self
where P: Into<Prime>, I: Into<AdicValuation<usize>>,

Create an AdicInteger representing a power of p Read more
Source§

fn padded_digits(&self, n: usize) -> Vec<u32>

Get a vector of the digits, padding with zeros, to exactly n. See also: into_padded_digits Read more
Source§

fn into_padded_digits(self, n: usize) -> Vec<u32>
where Self: Sized,

Get a vector of the digits, padding with zeros, to exactly n. See also: padded_digits Read more
Source§

fn truncation(&self, n: usize) -> UAdic

Truncate an adic number’s expansion to n. This can be thought of as the remainder a % p^n. See also: into_truncation Read more
Source§

fn into_truncation(self, n: usize) -> UAdic

Consume AdicInteger and get the truncation. See also: truncation Read more
Source§

fn approximation(&self, n: usize) -> ZAdic
where Self: AdicApproximate,

Approximate an adic number’s expansion to n digits. See also: into_approximation Read more
Source§

fn into_approximation(self, n: usize) -> ZAdic
where Self: AdicApproximate,

Consume AdicInteger and get the approximation. See also: approximation Read more
Source§

fn split(&self, n: usize) -> (UAdic, Self)

Split adic into digits [0, n) and [n, …). This splits the number into remainder and quotient. See also: into_split Read more
Source§

fn quotient(&self, n: usize) -> Self

Divide an adic number by p^n. This can be thought of as the quotient a // p^n Read more
Source§

fn into_quotient(self, n: usize) -> Self

Divide an adic number by p^n. This can be thought of as the quotient a // p^n Read more
Source§

fn nth_root(&self, n: u32, precision: usize) -> AdicResult<ZAdicVariety>
where Self: Into<ZAdic>,

Calculate the n-th root, to {precision} digits, using Hensel lifting. Read more
Source§

fn num_nth_roots(&self, n: u32) -> AdicResult<usize>
where Self: Into<ZAdic>,

Return the number of n-th roots of this AdicInteger Read more
Source§

impl AdicNumber for IAdic

Source§

fn zero<P>(p: P) -> Self
where P: Into<Prime>,

Create the zero adic number Read more
Source§

fn one<P>(p: P) -> Self
where P: Into<Prime>,

Create the one adic number Read more
Source§

fn p(&self) -> Prime

Prime for this adic
Source§

fn from_u32<P>(p: P, n: u32) -> Self
where P: Into<Prime>,

Create AdicNumber from u32 Read more
Source§

fn is_zero(&self) -> bool

Test if it is the zero adic number Read more
Source§

impl Clone for IAdic

Source§

fn clone(&self) -> IAdic

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 IAdic

Source§

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

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

impl Display for IAdic

Source§

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

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

impl Div<&IAdic> for &IAdic

Source§

type Output = LazyDiv<IAdic>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&IAdic> for IAdic

Source§

type Output = LazyDiv<IAdic>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<IAdic> for &IAdic

Source§

type Output = LazyDiv<IAdic>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div for IAdic

Source§

type Output = LazyDiv<IAdic>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<A> From<IAdic> for QAdic<A>
where A: AdicInteger + From<IAdic>,

Source§

fn from(value: IAdic) -> Self

Converts to this type from the input type.
Source§

impl From<IAdic> for RAdic

Source§

fn from(a: IAdic) -> Self

Converts to this type from the input type.
Source§

impl From<IAdic> for ZAdic

Source§

fn from(a: IAdic) -> Self

Converts to this type from the input type.
Source§

impl From<UAdic> for IAdic

Source§

fn from(a: UAdic) -> Self

Converts to this type from the input type.
Source§

impl HasDigits for IAdic

Source§

type DigitIndex = usize

Type for the valuation, e.g. the type of v in a/b p^v
Source§

fn base(&self) -> Composite

Number of possibilities for digits Read more
Source§

fn min_index(&self) -> AdicValuation<Self::DigitIndex>

Minimum digit index, possibly zero for positive valuation numbers. This is the index where the first digit of [digits](Self::digits) starts. Read more
Source§

fn num_digits(&self) -> AdicValuation<usize>

The number of digits this number ultimately has, finite or infinite. Returns (num+|valuation|) if valuation is negative and (num) if it is positive. Read more
Source§

fn digit(&self, n: usize) -> AdicResult<u32>

Gets the digit at this coefficient of p^n; error if it is beyond known digits (certainty) Read more
Source§

fn digits(&self) -> impl Iterator<Item = u32>

Digits for this adic, from the p^v coefficient to p^(v+1), etc. Read more
Source§

fn into_digits(self) -> impl Iterator<Item = u32>

Consume AdicInteger and get the digits iterator Read more
Source§

fn has_finite_digits(&self) -> bool

Test if adic number has finite digits Read more
Source§

fn digit0(&self) -> AdicResult<u32>

Returns the digit in the zeroth position or Err if certainty <= 0 Read more
Source§

impl Hash for IAdic

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 Inv for IAdic

Source§

type Output = LazyDiv<IAdic>

The result after applying the operator.
Source§

fn inv(self) -> Self::Output

Returns the multiplicative inverse of self. Read more
Source§

impl Mul<&IAdic> for &IAdic

Source§

type Output = IAdic

The resulting type after applying the * operator.
Source§

fn mul(self, b: &IAdic) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&IAdic> for IAdic

Source§

type Output = IAdic

The resulting type after applying the * operator.
Source§

fn mul(self, b: &IAdic) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&IAdic> for u32

Source§

type Output = IAdic

The resulting type after applying the * operator.
Source§

fn mul(self, adic_int: &IAdic) -> IAdic

Performs the * operation. Read more
Source§

impl Mul<IAdic> for &IAdic

Source§

type Output = IAdic

The resulting type after applying the * operator.
Source§

fn mul(self, b: IAdic) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<IAdic> for u32

Source§

type Output = IAdic

The resulting type after applying the * operator.
Source§

fn mul(self, adic_int: IAdic) -> IAdic

Performs the * operation. Read more
Source§

impl Mul<u32> for &IAdic

Source§

type Output = IAdic

The resulting type after applying the * operator.
Source§

fn mul(self, coeff: u32) -> IAdic

Performs the * operation. Read more
Source§

impl Mul<u32> for IAdic

Source§

type Output = IAdic

The resulting type after applying the * operator.
Source§

fn mul(self, coeff: u32) -> IAdic

Performs the * operation. Read more
Source§

impl Mul for IAdic

Source§

type Output = IAdic

The resulting type after applying the * operator.
Source§

fn mul(self, b: IAdic) -> Self::Output

Performs the * operation. Read more
Source§

impl Neg for &IAdic

Source§

type Output = IAdic

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Neg for IAdic

Source§

type Output = IAdic

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl PartialEq for IAdic

Source§

fn eq(&self, other: &IAdic) -> 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 Pow<u32> for &IAdic

Source§

type Output = IAdic

The result after applying the operator.
Source§

fn pow(self, power: u32) -> Self::Output

Returns self to the power rhs. Read more
Source§

impl Pow<u32> for IAdic

Source§

type Output = IAdic

The result after applying the operator.
Source§

fn pow(self, power: u32) -> Self::Output

Returns self to the power rhs. Read more
Source§

impl Sub<&IAdic> for &IAdic

Source§

type Output = IAdic

The resulting type after applying the - operator.
Source§

fn sub(self, b: &IAdic) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&IAdic> for IAdic

Source§

type Output = IAdic

The resulting type after applying the - operator.
Source§

fn sub(self, b: &IAdic) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<IAdic> for &IAdic

Source§

type Output = IAdic

The resulting type after applying the - operator.
Source§

fn sub(self, b: IAdic) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for IAdic

Source§

type Output = IAdic

The resulting type after applying the - operator.
Source§

fn sub(self, b: IAdic) -> Self::Output

Performs the - operation. Read more
Source§

impl TryFrom<IAdic> for UAdic

Source§

type Error = AdicError

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

fn try_from(a: IAdic) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<RAdic> for IAdic

Source§

type Error = AdicError

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

fn try_from(a: RAdic) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Eq for IAdic

Source§

impl StructuralPartialEq for IAdic

Auto Trait Implementations§

§

impl Freeze for IAdic

§

impl RefUnwindSafe for IAdic

§

impl Send for IAdic

§

impl Sync for IAdic

§

impl Unpin for IAdic

§

impl UnwindSafe for IAdic

Blanket Implementations§

Source§

impl<A> AdicSized for A
where A: AdicInteger,

Source§

type ValuationRing = usize

Type for the valuation, e.g. the type of v in a/b p^v
Source§

type AdicUnit = A

Type for the adic unit, the “size 1” type, e.g. UAdic if the AdicSized is QAdic<UAdic>
Source§

fn valuation(&self) -> AdicValuation<usize>

The adic valuation for this number: v(a/b p^v) = v Read more
Source§

fn norm(&self) -> Ratio<u32>

The adic norm for this number: |a/b p^v| = p^(-v) Read more
Source§

fn unit(&self) -> Option<<A as AdicSized>::AdicUnit>

The adic unit for this number: u(a/b p^v) = a/b Read more
Source§

fn into_unit(self) -> Option<<A as AdicSized>::AdicUnit>

Consume this number to get the adic unit: u(a/b p^v) = a/b Read more
Source§

fn is_unit(&self) -> bool

Test if it is a unit, valuation zero, if no fractional digits but the zeroth digit is nonzero Read more
Source§

fn unit_and_valuation( &self, ) -> (Option<Self::AdicUnit>, AdicValuation<Self::ValuationRing>)

Transform into the adic unit and valuation form; transforms zero into (None, PosInf) Read more
Source§

fn into_unit_and_valuation( self, ) -> (Option<Self::AdicUnit>, AdicValuation<Self::ValuationRing>)
where Self: Sized,

Transform into the adic unit and valuation form; transforms zero into (None, PosInf) Read more
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> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. 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

Compare self to key and return true if they are equal.
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. 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> 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<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> SignedAdicNumber for T
where T: From<IAdic> + Neg<Output = T> + Sub<Output = T> + AdicNumber,

Source§

fn from_i32<P>(p: P, n: i32) -> T
where P: Into<Prime>,

Create SignedAdicNumber from i32 Read more
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
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