Struct Sub

Source
pub struct Sub<L, R> { /* private fields */ }

Trait Implementations§

Source§

impl<L: Clone, R: Clone> Clone for Sub<L, R>

Source§

fn clone(&self) -> Sub<L, R>

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<L, R> Signal for Sub<L, R>
where L: Signal, R: Signal, L::Type: Sub<R::Type>,

Source§

type Type = <<L as Signal>::Type as Sub<<R as Signal>::Type>>::Output

The type of the signal.
Source§

fn next(&mut self) -> Self::Type

Returns the next value of this signal.
Source§

fn add<S>(self, other: S) -> Add<Self, S>
where Self: Sized, S: Signal, Self::Type: Add<S::Type>,

Performs the + operation.
Source§

fn sub<S>(self, other: S) -> Sub<Self, S>
where Self: Sized, S: Signal, Self::Type: Sub<S::Type>,

Performs the - operation.
Source§

fn mul<S>(self, other: S) -> Mul<Self, S>
where Self: Sized, S: Signal, Self::Type: Mul<S::Type>,

Performs the * operation.
Source§

fn div<S>(self, other: S) -> Div<Self, S>
where Self: Sized, S: Signal, Self::Type: Div<S::Type>,

Performs the / operation.
Source§

fn rem<S>(self, other: S) -> Rem<Self, S>
where Self: Sized, S: Signal, Self::Type: Rem<S::Type>,

Performs the % operation.
Source§

fn bitand<S>(self, other: S) -> BitAnd<Self, S>
where Self: Sized, S: Signal, Self::Type: BitAnd<S::Type>,

Performs the & operation.
Source§

fn bitor<S>(self, other: S) -> BitOr<Self, S>
where Self: Sized, S: Signal, Self::Type: BitOr<S::Type>,

Performs the | operation.
Source§

fn bitxor<S>(self, other: S) -> BitXor<Self, S>
where Self: Sized, S: Signal, Self::Type: BitXor<S::Type>,

Performs the ^ operation.
Source§

fn shr<S>(self, other: S) -> Shr<Self, S>
where Self: Sized, S: Signal, Self::Type: Shr<S::Type>,

Performs the >> operation.
Source§

fn shl<S>(self, other: S) -> Shl<Self, S>
where Self: Sized, S: Signal, Self::Type: Shl<S::Type>,

Performs the << operation.
Source§

fn neg(self) -> Neg<Self>
where Self: Sized, Self::Type: Neg,

Negates this signal.
Source§

fn min<S>(self, other: S) -> Min<Self, S>
where Self: Sized, S: Signal<Type = Self::Type>, Self::Type: Ord,

Returns the minimum of this signal and the other.
Source§

fn max<S>(self, other: S) -> Max<Self, S>
where Self: Sized, S: Signal<Type = Self::Type>, Self::Type: Ord,

Returns the maximum of this signal and the other.
Source§

fn clamp<Min, Max>(self, min: Min, max: Max) -> Clamp<Self, Min, Max>
where Self: Sized, Min: Signal<Type = Self::Type>, Max: Signal<Type = Self::Type>, Self::Type: Ord,

Clamps this signal between min and max. This result of this function is the same as .max(min).min(max).
Source§

fn map<F, T>(self, map: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Type) -> T,

Maps this signal to another using the given function.
Source§

fn filter<F>(self, predicate: F) -> Filter<Self, F>
where Self: Sized, F: FnMut(&Self::Type) -> bool,

Filters values of the signal with the given predicate.
Source§

fn filter_map<F, T>(self, predicate: F) -> FilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Type) -> Option<T>,

Filters and maps a signal to another using the given predicate.
Source§

fn cloned<'a, T>(self) -> Cloned<Self>
where Self: Sized + Signal<Type = &'a T>, T: 'a + Clone,

Clones the values of this signal. This is useful to turn a Signal<Type = &T> into a Signal<Type = T>.
Source§

fn inspect<F>(self, inspect: F) -> Inspect<Self, F>
where Self: Sized, F: FnMut(&Self::Type),

Inspects the values of this signal by calling a function before yielding the value.
Source§

fn zip<S>(self, other: S) -> Zip<Self, S>
where Self: Sized, S: Signal,

Zips this signal with another.
Source§

fn into<T>(self) -> Into<Self, T>
where Self: Sized, Self::Type: Into<T>,

Turns this signal into another using the Into trait.
Source§

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Skips n values of the signal.
Source§

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

Creates an iterator that yields the values of this signal.
Source§

fn ease(self, amount: Self::Type) -> Ease<Self>
where Self: Sized, Self::Type: Float,

Eases this signal with the given amount. A greater amount will make the the signal smoother and any amount lower than 0.0 will give wierd results.
Source§

fn lerp<S>(self, other: S, amount: Self::Type) -> Lerp<Self, S>
where Self: Sized, S: Signal<Type = Self::Type>, Self::Type: Float,

Linearly interpolates between this signal and another.
Source§

fn wrapping_add<S, RefL, RefR, T>(self, other: S) -> WrappingAdd<T, Self, S>
where T: WrappingAdd, RefL: AsRef<T>, RefR: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = RefR>,

Source§

fn wrapping_sub<S, RefL, RefR, T>(self, other: S) -> WrappingSub<T, Self, S>
where T: WrappingSub, RefL: AsRef<T>, RefR: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = RefR>,

Source§

fn wrapping_mul<S, RefL, RefR, T>(self, other: S) -> WrappingMul<T, Self, S>
where T: WrappingMul, RefL: AsRef<T>, RefR: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = RefR>,

Source§

fn wrapping_shr<S, RefL, T>(self, other: S) -> WrappingShr<T, Self, S>
where T: WrappingShr, RefL: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = u32>,

Source§

fn wrapping_shl<S, RefL, T>(self, other: S) -> WrappingShl<T, Self, S>
where T: WrappingShl, RefL: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = u32>,

Source§

fn saturating_add<S, RefL, RefR, T>(self, other: S) -> SaturatingAdd<T, Self, S>
where T: SaturatingAdd, RefL: AsRef<T>, RefR: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = RefR>,

Source§

fn saturating_sub<S, RefL, RefR, T>(self, other: S) -> SaturatingSub<T, Self, S>
where T: SaturatingSub, RefL: AsRef<T>, RefR: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = RefR>,

Source§

fn saturating_mul<S, RefL, RefR, T>(self, other: S) -> SaturatingMul<T, Self, S>
where T: SaturatingMul, RefL: AsRef<T>, RefR: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = RefR>,

Source§

fn checked_add<S, RefL, RefR, T>(self, other: S) -> CheckedAdd<T, Self, S>
where T: CheckedAdd, RefL: AsRef<T>, RefR: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = RefR>,

Source§

fn checked_sub<S, RefL, RefR, T>(self, other: S) -> CheckedSub<T, Self, S>
where T: CheckedSub, RefL: AsRef<T>, RefR: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = RefR>,

Source§

fn checked_mul<S, RefL, RefR, T>(self, other: S) -> CheckedMul<T, Self, S>
where T: CheckedMul, RefL: AsRef<T>, RefR: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = RefR>,

Source§

fn checked_shr<S, RefL, T>(self, other: S) -> CheckedShr<T, Self, S>
where T: CheckedShr, RefL: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = u32>,

Source§

fn checked_shl<S, RefL, T>(self, other: S) -> CheckedShl<T, Self, S>
where T: CheckedShr, RefL: AsRef<T>, Self: Sized + Signal<Type = RefL>, S: Signal<Type = u32>,

Source§

fn inv(self) -> Inv<Self>
where Self: Sized, Self::Type: Inv,

Source§

fn mul_add<M, A>(self, mul: M, add: A) -> MulAdd<Self, M, A>
where Self: Sized, M: Signal, A: Signal, Self::Type: MulAdd<M::Type, A::Type>,

Source§

fn pow<E>(self, exp: E) -> Pow<Self, E>
where Self: Sized, E: Signal, Self::Type: Pow<E::Type>,

Source§

fn interpolate<F>(self, length: usize, interpolate: F) -> Interpolate<Self, F>
where Self: Sized, Self::Type: Float + FromPrimitive, F: FnMut(Self::Type, Self::Type, Self::Type) -> Self::Type,

Creates a signal that interpolates new values using the given interpolation function.

Auto Trait Implementations§

§

impl<L, R> Freeze for Sub<L, R>
where L: Freeze, R: Freeze,

§

impl<L, R> RefUnwindSafe for Sub<L, R>

§

impl<L, R> Send for Sub<L, R>
where L: Send, R: Send,

§

impl<L, R> Sync for Sub<L, R>
where L: Sync, R: Sync,

§

impl<L, R> Unpin for Sub<L, R>
where L: Unpin, R: Unpin,

§

impl<L, R> UnwindSafe for Sub<L, R>
where L: UnwindSafe, R: 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
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> 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, 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