Skip to main content

FourMomentum

Struct FourMomentum 

Source
pub struct FourMomentum<T> {
    pub temporal: Energy<T>,
    pub spatial: ThreeMomentum<T>,
}
Expand description

A contravariant four-momentum (E, px, py, pz) with mostly-minus metric.

Fields§

§temporal: Energy<T>

Temporal component.

§spatial: ThreeMomentum<T>

Cartesian spatial component.

Implementations§

Source§

impl<T> FourMomentum<T>

Source

pub const fn new(temporal: Energy<T>, spatial: ThreeMomentum<T>) -> Self

Construct a four-momentum from temporal and spatial components.

Source

pub const fn from_args(energy: T, px: T, py: T, pz: T) -> Self

Construct a four-momentum from (E, px, py, pz).

Source

pub fn map<U>(self, map: impl FnMut(T) -> U) -> FourMomentum<U>

Transform the momentum’s scalar type.

Source

pub fn map_ref<U>(&self, map: impl FnMut(&T) -> U) -> FourMomentum<U>

Transform borrowed components into another scalar type.

Source

pub fn components(&self) -> [&T; 4]

Borrow the components in (E, px, py, pz) order.

Source

pub fn dot(&self, rhs: &Self) -> T
where T: Clone + Mul<Output = T> + Add<Output = T> + Sub<Output = T>,

Compute the Minkowski scalar product with mostly-minus metric.

Source

pub fn mass_squared(&self) -> T
where T: Clone + Mul<Output = T> + Add<Output = T> + Sub<Output = T>,

Compute invariant mass squared with mostly-minus metric.

Source§

impl<T: FloatLike> FourMomentum<T>

Source

pub fn zero(representative: &T) -> Self

Construct the zero four-vector retaining precision and derivative shape.

Source§

impl<T: KinematicScalar> FourMomentum<T>

Source

pub fn flux(&self, other: Option<&Self>) -> T

Initial-state denominator: 2 E for decay or invariant scattering flux.

The one-particle value is frame dependent. Two future-directed on-shell momenta give 4 sqrt((p1.p2)^2 - p1^2 p2^2). Unit conversion, averages and phase-space symmetry factors are not included.

Source

pub fn mass(&self) -> T

Return the positive square root of invariant mass squared.

Source

pub fn pt_squared(&self) -> T

Compute transverse momentum squared.

Source

pub fn pt(&self) -> T

Compute transverse momentum.

Source

pub fn phi(&self) -> T

Return the azimuthal angle in [0, 2*pi).

Source

pub fn pseudorapidity(&self) -> T

Compute pseudorapidity from the spatial momentum.

Source

pub fn rapidity(&self) -> T

Compute rapidity, using a finite sentinel for a massless beam-axis momentum.

Source

pub fn delta_phi(&self, rhs: &Self) -> T

Compute the wrapped absolute azimuthal separation in [0, pi].

Source

pub fn delta_r(&self, rhs: &Self) -> T

Compute separation in rapidity and azimuth, as used by hadron-collider jets.

Source§

impl<T: KinematicScalar> FourMomentum<T>

Source

pub fn transverse_basis(&self) -> [[T; 4]; 2]

GammaLoop’s two real transverse basis vectors, in (E,x,y,z) order.

The beam-axis branches and phases are inherited from its HELAS/MadGraph implementation. This basis also fixes the convention at zero momentum.

Source

pub fn helicity_spinor(&self, helicity: Sign) -> [Complex<T>; 2]

The two-component helicity spinor used by both u and v.

Source

pub fn spinor_energy_factor(&self, sign: Sign) -> Complex<T>

GammaLoop’s principal square root of E ± |p|.

Source

pub fn wavefunction( &self, kind: WavefunctionKind, helicity: Helicity, ) -> Result<Wavefunction<T>, WavefunctionError>

Construct one fixed external state, without averaging or summing helicities.

Vectors use signature +---. Fermions use GammaLoop’s chiral gamma-matrix basis and MadGraph phases, including the negative-z axis limit. All states are four-dimensional; keep the internal regulator dimension separately. Longitudinal states require positive mass squared. At zero spatial momentum the longitudinal state is HELAS’s rest-frame (0,0,0,1), the |p| -> 0 limit of the moving state for momentum along +z.

Source

pub fn wavefunction_after_rotations( &self, kind: WavefunctionKind, helicity: Helicity, rotations: &[Rotation<T>], ) -> Result<Wavefunction<T>, WavefunctionError>

The external state of this momentum after active rotations of its event.

rotations were applied to the event in order and self is the rotated momentum. The result is the state of the unrotated momentum transformed by each rotation, so a state at rest keeps its rotated quantization axis. For a moving state it differs from Self::wavefunction of the rotated momentum only by a phase.

Source§

impl FourMomentum<Atom>

Source

pub fn weyl_matrix(&self) -> [[Atom; 2]; 2]

The Weyl matrix [[E+pz, px-i py], [px+i py, E-pz]].

Its determinant is the mostly-minus invariant p.p. Components are exact Symbolica expressions, suitable for precision-generic evaluators.

Source

pub fn null_weyl_spinors( &self, pivot: [usize; 2], ) -> Result<[[Atom; 2]; 2], SymbolicKinematicsError>

Factor a nonzero null momentum into angle and square Weyl components.

Returns [angle, square], where weyl_matrix()[i][j] equals angle[i] * square[j] on p.p = 0. The angle is the selected column; the square is the selected row divided by its pivot. This fixes the reciprocal rescaling freedom without introducing a square-root branch.

The caller must select a nonzero entry [row, column] at evaluation time and supply a null momentum. Selection can use primal values while numerical evaluation retains all precision and Dual components. A chart is valid only where its pivot remains nonzero. This method rejects an out-of-range or identically zero pivot; it does not infer assumptions about symbolic components or test the on-shell relation.

Source

pub fn from_weyl_spinors(angle: &[Atom; 2], square: &[Atom; 2]) -> Self

Construct the complex null momentum whose Weyl matrix is angle ⊗ square.

Mixing the angle of one null momentum with the square of another gives a null vector orthogonal to both. No conjugation is applied: the two spinors are independent complex components. This is the convention p = 1/2 <angle | gamma | square] with (E, px, py, pz) ordering.

Trait Implementations§

Source§

impl<T> Add for FourMomentum<T>
where T: Add<Output = T>,

Source§

type Output = FourMomentum<T>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<T> Add<&FourMomentum<T>> for FourMomentum<T>
where T: for<'a> Add<&'a T, Output = T>,

Source§

type Output = FourMomentum<T>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<T> AddAssign for FourMomentum<T>
where T: AddAssign,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<T: Clone> Clone for FourMomentum<T>

Source§

fn clone(&self) -> FourMomentum<T>

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<T: Copy> Copy for FourMomentum<T>

Source§

impl<T: Debug> Debug for FourMomentum<T>

Source§

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

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

impl<T: Default> Default for FourMomentum<T>

Source§

fn default() -> FourMomentum<T>

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

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

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<T: Display> Display for FourMomentum<T>

Source§

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

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

impl<T: Eq> Eq for FourMomentum<T>

Source§

impl<T> From<(T, T, T, T)> for FourMomentum<T>

Source§

fn from((energy, px, py, pz): (T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<FourMomentum<T>> for [T; 4]

Source§

fn from(momentum: FourMomentum<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<FourMomentum<T>> for (T, T, T, T)

Source§

fn from(momentum: FourMomentum<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<[T; 4]> for FourMomentum<T>

Source§

fn from([energy, px, py, pz]: [T; 4]) -> Self

Converts to this type from the input type.
Source§

impl<T: Hash> Hash for FourMomentum<T>

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<T> IntoIterator for FourMomentum<T>

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T, 4>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T> IntoIterator for &'a FourMomentum<T>

Source§

type Item = &'a T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<&'a T, 4>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T: LowerExp> LowerExp for FourMomentum<T>

Source§

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

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

impl<T> Mul<T> for FourMomentum<T>
where T: Clone + Mul<Output = T>,

Source§

type Output = FourMomentum<T>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<T> Neg for FourMomentum<T>
where T: Neg<Output = T>,

Source§

type Output = FourMomentum<T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T> Neg for &FourMomentum<T>
where T: Clone + Neg<Output = T>,

Source§

type Output = FourMomentum<T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: PartialEq> PartialEq for FourMomentum<T>

Source§

fn eq(&self, other: &FourMomentum<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<T> Serialize for FourMomentum<T>
where T: Serialize,

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<T: PartialEq> StructuralPartialEq for FourMomentum<T>

Source§

impl<T> Sub for FourMomentum<T>
where T: Sub<Output = T>,

Source§

type Output = FourMomentum<T>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<T> SubAssign for FourMomentum<T>
where T: SubAssign,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<T> Freeze for FourMomentum<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for FourMomentum<T>
where T: RefUnwindSafe,

§

impl<T> Send for FourMomentum<T>
where T: Send,

§

impl<T> Sync for FourMomentum<T>
where T: Sync,

§

impl<T> Unpin for FourMomentum<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for FourMomentum<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for FourMomentum<T>
where T: UnwindSafe,

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
§

impl<T> AtomComponentOptimizable<()> for T

Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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
§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

§

impl<T, Right> ClosedAddAssign<Right> for T
where T: ClosedAdd<Right> + AddAssign<Right>,

§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

§

impl<T, Right> ClosedSubAssign<Right> for T
where T: ClosedSub<Right> + SubAssign<Right>,

§

impl<T> Conv for T

§

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

Converts self into T using Into<T>. Read more
Source§

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

Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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

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

impl<T> FmtForward for T

§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> IntoRecords for T

§

type Cell = <<T as IntoIterator>::Item as IntoIterator>::Item

A string representation of a grid cell.
§

type IterColumns = <T as IntoIterator>::Item

Cell iterator inside a row.
§

type IterRows = <T as IntoIterator>::IntoIter

Rows iterator.
§

fn iter_rows(self) -> <T as IntoRecords>::IterRows

Returns an iterator over rows.
Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
§

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

§

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
§

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
§

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
§

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
§

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
§

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

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

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

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

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T, O> RefNeg for T
where &'a T: for<'a> Neg<Output = O>, T: ?Sized,

§

type Output = O

The resulting type after applying neg operation.
§

fn ref_neg(&self) -> O

Performs neg operation.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
§

impl<T> Tap for T

§

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

Immutable access to a value. Read more
§

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

Mutable access to a value. Read more
§

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
§

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
§

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
§

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
§

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
§

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
§

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

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

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

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

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

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

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

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

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

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

impl<I> ToLendingIterator for I
where I: IntoIterator,

§

fn windows(self, size: usize) -> Windows<Self::IntoIter>
where Self: Sized,

Turns this iterator into a lending iterator over windows of elements (&[Item]). Read more
§

fn windows_mut(self, size: usize) -> WindowsMut<Self::IntoIter>
where Self: Sized,

Turns this iterator into a lending iterator over mutable windows of elements (&mut [Item]). Read more
§

fn into_lending(self) -> IntoLending<Self::IntoIter>
where Self: Sized,

Turns this iterator into a lending iterator trivially.
§

fn lend_refs(self) -> LendRefs<Self::IntoIter>
where Self: Sized,

Turns this iterator into a lending iterator that lends references to the iterator’s items.
§

fn lend_refs_mut(self) -> LendRefsMut<Self::IntoIter>
where Self: Sized,

Turns this iterator into a lending iterator that lends mutable references to the iterator’s items.
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
§

impl<T> TryConv for T

§

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

impl<T, U> TryFromUpgrade<T> for U
where T: TrySmallestUpgrade<U, LCM = U>, U: Clone,

§

fn try_from_upgrade(value: &T) -> Option<U>

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

impl<T, U> TryIntoUpgrade<U> for T
where U: TryFromUpgrade<T>,

§

fn try_into_upgrade(&self) -> Option<U>

Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.