pub struct MulExpression<L, R> {
pub lhs: L,
pub rhs: R,
}Expand description
An expression representing deferred multiplication.
The exact product is kept until the expression is converted to a target
resolution or assigned to a FastFixed variable, so the result format does
not depend on operand order.
Fields§
§lhs: LThe left-hand factor of the multiplication expression.
rhs: RThe right-hand factor of the multiplication expression.
Trait Implementations§
Source§impl<L, R, E> Add<E> for MulExpression<L, R>
impl<L, R, E> Add<E> for MulExpression<L, R>
Source§type Output = SumExpression<MulExpression<L, R>, E>
type Output = SumExpression<MulExpression<L, R>, E>
The resulting type after applying the
+ operator.Source§impl<I, const FRAC: usize, L, R> Add<FastFixed<I, FRAC>> for MulExpression<L, R>where
I: Bounded + NumCast + Copy,
MulExpression<L, R>: FastExpression,
FastFixed<I, FRAC>: Add<FastFixed<I, FRAC>>,
impl<I, const FRAC: usize, L, R> Add<FastFixed<I, FRAC>> for MulExpression<L, R>where
I: Bounded + NumCast + Copy,
MulExpression<L, R>: FastExpression,
FastFixed<I, FRAC>: Add<FastFixed<I, FRAC>>,
Source§impl<L: Clone, R: Clone> Clone for MulExpression<L, R>
impl<L: Clone, R: Clone> Clone for MulExpression<L, R>
impl<L: Copy, R: Copy> Copy for MulExpression<L, R>
Source§impl<T, const FL: usize, U, const FR: usize> FastExpression for MulExpression<FastFixed<T, FL>, FastFixed<U, FR>>where
T: PromoteMul<U> + Zero + PartialOrd + NumCast + Copy,
U: Zero + PartialOrd + NumCast + Copy,
<T as PromoteMul<U>>::Output: FastInt,
impl<T, const FL: usize, U, const FR: usize> FastExpression for MulExpression<FastFixed<T, FL>, FastFixed<U, FR>>where
T: PromoteMul<U> + Zero + PartialOrd + NumCast + Copy,
U: Zero + PartialOrd + NumCast + Copy,
<T as PromoteMul<U>>::Output: FastInt,
Source§type Int = <<T as PromoteMul<U>>::Output as FastInt>::Intermediate
type Int = <<T as PromoteMul<U>>::Output as FastInt>::Intermediate
The 64-bit intermediate integer type the expression is evaluated in.
Source§fn evaluate_raw(self) -> Self::Int
fn evaluate_raw(self) -> Self::Int
Evaluates the expression to its raw value with
Self::FRAC fractional bits.Source§impl<I, const FRAC_OUT: usize, L, R> From<MulExpression<L, R>> for FastFixed<I, FRAC_OUT>
impl<I, const FRAC_OUT: usize, L, R> From<MulExpression<L, R>> for FastFixed<I, FRAC_OUT>
Source§fn from(expr: MulExpression<L, R>) -> Self
fn from(expr: MulExpression<L, R>) -> Self
Converts to this type from the input type.
Source§impl<I, const FRAC: usize, L, R> PartialEq<FastFixed<I, FRAC>> for MulExpression<L, R>
impl<I, const FRAC: usize, L, R> PartialEq<FastFixed<I, FRAC>> for MulExpression<L, R>
Source§impl<I, const FRAC: usize, L, R> PartialOrd<FastFixed<I, FRAC>> for MulExpression<L, R>
impl<I, const FRAC: usize, L, R> PartialOrd<FastFixed<I, FRAC>> for MulExpression<L, R>
Source§impl<L, R, E> Sub<E> for MulExpression<L, R>
impl<L, R, E> Sub<E> for MulExpression<L, R>
Source§type Output = SumExpression<MulExpression<L, R>, E>
type Output = SumExpression<MulExpression<L, R>, E>
The resulting type after applying the
- operator.Source§impl<I, const FRAC: usize, L, R> Sub<FastFixed<I, FRAC>> for MulExpression<L, R>where
I: Bounded + NumCast + Copy,
MulExpression<L, R>: FastExpression,
FastFixed<I, FRAC>: Sub<FastFixed<I, FRAC>>,
impl<I, const FRAC: usize, L, R> Sub<FastFixed<I, FRAC>> for MulExpression<L, R>where
I: Bounded + NumCast + Copy,
MulExpression<L, R>: FastExpression,
FastFixed<I, FRAC>: Sub<FastFixed<I, FRAC>>,
Auto Trait Implementations§
impl<L, R> Freeze for MulExpression<L, R>where
L: Freeze,
R: Freeze,
impl<L, R> RefUnwindSafe for MulExpression<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for MulExpression<L, R>where
L: Send,
R: Send,
impl<L, R> Sync for MulExpression<L, R>where
L: Sync,
R: Sync,
impl<L, R> Unpin for MulExpression<L, R>where
L: Unpin,
R: Unpin,
impl<L, R> UnsafeUnpin for MulExpression<L, R>where
L: UnsafeUnpin,
R: UnsafeUnpin,
impl<L, R> UnwindSafe for MulExpression<L, R>where
L: UnwindSafe,
R: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)