pub trait Sub<Rhs = Self> {
type Output;
// Required method
fn sub(self, rhs: Rhs) -> Self::Output;
}Expand description
The subtraction operator -.
Note that Rhs is Self by default, but this is not mandatory. For
example, std::time::SystemTime implements Sub<Duration>, which permits
operations of the form SystemTime = SystemTime - Duration.
§Examples
§Subtractable points
use std::ops::Sub;
#[derive(Debug, Copy, Clone, PartialEq)]
struct Point {
x: i32,
y: i32,
}
impl Sub for Point {
type Output = Self;
fn sub(self, other: Self) -> Self::Output {
Self {
x: self.x - other.x,
y: self.y - other.y,
}
}
}
assert_eq!(Point { x: 3, y: 3 } - Point { x: 2, y: 3 },
Point { x: 1, y: 0 });§Implementing Sub with generics
Here is an example of the same Point struct implementing the Sub trait
using generics.
use std::ops::Sub;
#[derive(Debug, PartialEq)]
struct Point<T> {
x: T,
y: T,
}
// Notice that the implementation uses the associated type `Output`.
impl<T: Sub<Output = T>> Sub for Point<T> {
type Output = Self;
fn sub(self, other: Self) -> Self::Output {
Point {
x: self.x - other.x,
y: self.y - other.y,
}
}
}
assert_eq!(Point { x: 2, y: 3 } - Point { x: 1, y: 0 },
Point { x: 1, y: 3 });Required Associated Types§
Required Methods§
Implementors§
1.74.0 (const: unstable) · Source§impl Sub for Saturating<i128>
impl Sub for Saturating<i128>
type Output = Saturating<i128>
1.74.0 (const: unstable) · Source§impl Sub for Saturating<isize>
impl Sub for Saturating<isize>
type Output = Saturating<isize>
1.74.0 (const: unstable) · Source§impl Sub for Saturating<u128>
impl Sub for Saturating<u128>
type Output = Saturating<u128>
1.74.0 (const: unstable) · Source§impl Sub for Saturating<usize>
impl Sub for Saturating<usize>
type Output = Saturating<usize>
Source§impl Sub for Effects
§Examples
let effects = (anstyle::Effects::BOLD | anstyle::Effects::UNDERLINE) - anstyle::Effects::BOLD;
assert_eq!(format!("{:?}", effects), "Effects(UNDERLINE)");
impl Sub for Effects
§Examples
let effects = (anstyle::Effects::BOLD | anstyle::Effects::UNDERLINE) - anstyle::Effects::BOLD;
assert_eq!(format!("{:?}", effects), "Effects(UNDERLINE)");Source§impl Sub for EdwardsPoint
impl Sub for EdwardsPoint
type Output = EdwardsPoint
Source§impl Sub for RistrettoPoint
impl Sub for RistrettoPoint
type Output = RistrettoPoint
Source§impl Sub for Date
Computes the span of time between two dates.
impl Sub for Date
Computes the span of time between two dates.
This will return a negative span when the date being subtracted is greater.
Since this uses the default configuration for calculating a span between two date (no rounding and largest units is days), this will never panic or fail in any way.
To configure the largest unit or enable rounding, use Date::since.
Source§impl Sub for DateTime
Computes the span of time between two datetimes.
impl Sub for DateTime
Computes the span of time between two datetimes.
This will return a negative span when the datetime being subtracted is greater.
Since this uses the default configuration for calculating a span between
two datetimes (no rounding and largest units is days), this will never
panic or fail in any way. It is guaranteed that the largest non-zero
unit in the Span returned will be days.
To configure the largest unit or enable rounding, use DateTime::since.
If you need a SignedDuration representing the span between two civil
datetimes, then use DateTime::duration_since.
Source§impl Sub for Time
Computes the span of time between two times.
impl Sub for Time
Computes the span of time between two times.
This will return a negative span when the time being subtracted is greater.
Since this uses the default configuration for calculating a span between two times (no rounding and largest units is hours), this will never panic or fail in any way.
To configure the largest unit or enable rounding, use Time::since.
Source§impl Sub for SignedDuration
impl Sub for SignedDuration
type Output = SignedDuration
Source§impl Sub for Timestamp
Computes the span of time between two timestamps.
impl Sub for Timestamp
Computes the span of time between two timestamps.
This will return a negative span when the timestamp being subtracted is greater.
Since this uses the default configuration for calculating a span between two timestamps (no rounding and largest units is seconds), this will never panic or fail in any way.
To configure the largest unit or enable rounding, use Timestamp::since.
Source§impl Sub for Offset
Computes the span of time between two offsets.
impl Sub for Offset
Computes the span of time between two offsets.
This will return a negative span when the offset being subtracted is greater (i.e., more east with respect to the prime meridian).
Source§impl Sub for Zoned
Computes the span of time between two zoned datetimes.
impl Sub for Zoned
Computes the span of time between two zoned datetimes.
This will return a negative span when the zoned datetime being subtracted is greater.
Since this uses the default configuration for calculating a span between
two zoned datetimes (no rounding and largest units is hours), this will
never panic or fail in any way. It is guaranteed that the largest non-zero
unit in the Span returned will be hours.
To configure the largest unit or enable rounding, use Zoned::since.
Using this implementation will result in consuming the Zoned value. Since
it is not Copy, this will prevent further use. If this is undesirable,
consider using the trait implementation for &Zoned, Zoned::since,
Zoned::until or cloning the Zoned value.
Source§impl Sub for StaticVarApiFlags
impl Sub for StaticVarApiFlags
type Output = StaticVarApiFlags
Source§impl Sub for CipherCtxFlags
impl Sub for CipherCtxFlags
type Output = CipherCtxFlags
Source§impl Sub for CMSOptions
impl Sub for CMSOptions
type Output = CMSOptions
Source§impl Sub for Pkcs7Flags
impl Sub for Pkcs7Flags
type Output = Pkcs7Flags
Source§impl Sub for ExtensionContext
impl Sub for ExtensionContext
type Output = ExtensionContext
Source§impl Sub for ShutdownState
impl Sub for ShutdownState
type Output = ShutdownState
Source§impl Sub for SslOptions
impl Sub for SslOptions
type Output = SslOptions
Source§impl Sub for SslSessionCacheMode
impl Sub for SslSessionCacheMode
type Output = SslSessionCacheMode
Source§impl Sub for SslVerifyMode
impl Sub for SslVerifyMode
type Output = SslVerifyMode
Source§impl Sub for X509CheckFlags
impl Sub for X509CheckFlags
type Output = X509CheckFlags
Source§impl Sub for X509VerifyFlags
impl Sub for X509VerifyFlags
type Output = X509VerifyFlags
Source§impl Sub for WasmFeatures
impl Sub for WasmFeatures
type Output = WasmFeatures
Source§impl Sub for SegmentFlags
impl Sub for SegmentFlags
type Output = SegmentFlags
Source§impl Sub for SymbolFlags
impl Sub for SymbolFlags
type Output = SymbolFlags
Source§impl Sub for CodeMetadata
impl Sub for CodeMetadata
type Output = CodeMetadata
Source§impl Sub for DurationMillis
impl Sub for DurationMillis
type Output = DurationMillis
Source§impl Sub for DurationSeconds
impl Sub for DurationSeconds
type Output = DurationSeconds
Source§impl Sub for EsdtLocalRoleFlags
impl Sub for EsdtLocalRoleFlags
type Output = EsdtLocalRoleFlags
Source§impl Sub for TimestampMillis
impl Sub for TimestampMillis
type Output = DurationMillis
Source§impl Sub for TimestampSeconds
impl Sub for TimestampSeconds
type Output = DurationSeconds
Source§impl Sub<&u128> for &multiversx_sc_snippets::imports::RustBigUint
impl Sub<&u128> for &multiversx_sc_snippets::imports::RustBigUint
Source§impl Sub<&usize> for &multiversx_sc_snippets::imports::RustBigUint
impl Sub<&usize> for &multiversx_sc_snippets::imports::RustBigUint
Source§impl Sub<&usize> for multiversx_sc_snippets::imports::RustBigUint
impl Sub<&usize> for multiversx_sc_snippets::imports::RustBigUint
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i8>> for &Saturating<i8>
impl Sub<&Saturating<i8>> for &Saturating<i8>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i8>> for Saturating<i8>
impl Sub<&Saturating<i8>> for Saturating<i8>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i16>> for &Saturating<i16>
impl Sub<&Saturating<i16>> for &Saturating<i16>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i16>> for Saturating<i16>
impl Sub<&Saturating<i16>> for Saturating<i16>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i32>> for &Saturating<i32>
impl Sub<&Saturating<i32>> for &Saturating<i32>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i32>> for Saturating<i32>
impl Sub<&Saturating<i32>> for Saturating<i32>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i64>> for &Saturating<i64>
impl Sub<&Saturating<i64>> for &Saturating<i64>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i64>> for Saturating<i64>
impl Sub<&Saturating<i64>> for Saturating<i64>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i128>> for &Saturating<i128>
impl Sub<&Saturating<i128>> for &Saturating<i128>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<i128>> for Saturating<i128>
impl Sub<&Saturating<i128>> for Saturating<i128>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<isize>> for &Saturating<isize>
impl Sub<&Saturating<isize>> for &Saturating<isize>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<isize>> for Saturating<isize>
impl Sub<&Saturating<isize>> for Saturating<isize>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u8>> for &Saturating<u8>
impl Sub<&Saturating<u8>> for &Saturating<u8>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u8>> for Saturating<u8>
impl Sub<&Saturating<u8>> for Saturating<u8>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u16>> for &Saturating<u16>
impl Sub<&Saturating<u16>> for &Saturating<u16>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u16>> for Saturating<u16>
impl Sub<&Saturating<u16>> for Saturating<u16>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u32>> for &Saturating<u32>
impl Sub<&Saturating<u32>> for &Saturating<u32>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u32>> for Saturating<u32>
impl Sub<&Saturating<u32>> for Saturating<u32>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u64>> for &Saturating<u64>
impl Sub<&Saturating<u64>> for &Saturating<u64>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u64>> for Saturating<u64>
impl Sub<&Saturating<u64>> for Saturating<u64>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u128>> for &Saturating<u128>
impl Sub<&Saturating<u128>> for &Saturating<u128>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<u128>> for Saturating<u128>
impl Sub<&Saturating<u128>> for Saturating<u128>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<usize>> for &Saturating<usize>
impl Sub<&Saturating<usize>> for &Saturating<usize>
1.74.0 (const: unstable) · Source§impl Sub<&Saturating<usize>> for Saturating<usize>
impl Sub<&Saturating<usize>> for Saturating<usize>
Source§impl Sub<&BigInt> for &multiversx_sc_snippets::imports::RustBigInt
impl Sub<&BigInt> for &multiversx_sc_snippets::imports::RustBigInt
Source§impl Sub<&BigUint> for &multiversx_sc_snippets::imports::RustBigUint
impl Sub<&BigUint> for &multiversx_sc_snippets::imports::RustBigUint
Source§impl Sub<&BigUint> for multiversx_sc_snippets::imports::RustBigUint
impl Sub<&BigUint> for multiversx_sc_snippets::imports::RustBigUint
Source§impl Sub<usize> for &multiversx_sc_snippets::imports::RustBigUint
impl Sub<usize> for &multiversx_sc_snippets::imports::RustBigUint
1.74.0 (const: unstable) · Source§impl Sub<Saturating<i8>> for &Saturating<i8>
impl Sub<Saturating<i8>> for &Saturating<i8>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<i16>> for &Saturating<i16>
impl Sub<Saturating<i16>> for &Saturating<i16>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<i32>> for &Saturating<i32>
impl Sub<Saturating<i32>> for &Saturating<i32>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<i64>> for &Saturating<i64>
impl Sub<Saturating<i64>> for &Saturating<i64>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<i128>> for &Saturating<i128>
impl Sub<Saturating<i128>> for &Saturating<i128>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<isize>> for &Saturating<isize>
impl Sub<Saturating<isize>> for &Saturating<isize>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<u8>> for &Saturating<u8>
impl Sub<Saturating<u8>> for &Saturating<u8>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<u16>> for &Saturating<u16>
impl Sub<Saturating<u16>> for &Saturating<u16>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<u32>> for &Saturating<u32>
impl Sub<Saturating<u32>> for &Saturating<u32>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<u64>> for &Saturating<u64>
impl Sub<Saturating<u64>> for &Saturating<u64>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<u128>> for &Saturating<u128>
impl Sub<Saturating<u128>> for &Saturating<u128>
1.74.0 (const: unstable) · Source§impl Sub<Saturating<usize>> for &Saturating<usize>
impl Sub<Saturating<usize>> for &Saturating<usize>
1.8.0 · Source§impl Sub<Duration> for SystemTime
impl Sub<Duration> for SystemTime
type Output = SystemTime
Source§impl Sub<Duration> for Date
Subtracts an unsigned duration of time from a date.
impl Sub<Duration> for Date
Subtracts an unsigned duration of time from a date.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Date::checked_sub.
Source§impl Sub<Duration> for DateTime
Subtracts an unsigned duration of time from a datetime.
impl Sub<Duration> for DateTime
Subtracts an unsigned duration of time from a datetime.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use DateTime::checked_sub.
Source§impl Sub<Duration> for Time
Subtracts an unsigned duration of time. This uses wrapping arithmetic.
impl Sub<Duration> for Time
Subtracts an unsigned duration of time. This uses wrapping arithmetic.
For checked arithmetic, see Time::checked_sub.
Source§impl Sub<Duration> for Timestamp
Subtracts an unsigned duration of time from a timestamp.
impl Sub<Duration> for Timestamp
Subtracts an unsigned duration of time from a timestamp.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Timestamp::checked_sub.
Source§impl Sub<Duration> for Offset
Subtracts an unsigned duration of time from an offset. This panics on
overflow.
impl Sub<Duration> for Offset
Subtracts an unsigned duration of time from an offset. This panics on overflow.
For checked arithmetic, see Offset::checked_sub.
Source§impl Sub<Duration> for Zoned
Subtracts an unsigned duration of time from a zoned datetime.
impl Sub<Duration> for Zoned
Subtracts an unsigned duration of time from a zoned datetime.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Zoned::checked_sub.
Using this implementation will result in consuming the Zoned value. Since
it is not Copy, this will prevent further use. If this is undesirable,
consider using the trait implementation for &Zoned, Zoned::checked_sub
or cloning the Zoned value.
Source§impl Sub<Effects> for Style
§Examples
let style = anstyle::Style::new().bold().underline() - anstyle::Effects::BOLD.into();
impl Sub<Effects> for Style
§Examples
let style = anstyle::Style::new().bold().underline() - anstyle::Effects::BOLD.into();Source§impl Sub<SignedDuration> for Date
Subtracts a signed duration of time from a date.
impl Sub<SignedDuration> for Date
Subtracts a signed duration of time from a date.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Date::checked_sub.
Source§impl Sub<SignedDuration> for DateTime
Subtracts a signed duration of time from a datetime.
impl Sub<SignedDuration> for DateTime
Subtracts a signed duration of time from a datetime.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use DateTime::checked_sub.
Source§impl Sub<SignedDuration> for Time
Subtracts a signed duration of time. This uses wrapping arithmetic.
impl Sub<SignedDuration> for Time
Subtracts a signed duration of time. This uses wrapping arithmetic.
For checked arithmetic, see Time::checked_sub.
Source§impl Sub<SignedDuration> for Timestamp
Subtracts a signed duration of time from a timestamp.
impl Sub<SignedDuration> for Timestamp
Subtracts a signed duration of time from a timestamp.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Timestamp::checked_sub.
Source§impl Sub<SignedDuration> for Offset
Subtracts a signed duration of time from an offset. This panics on
overflow.
impl Sub<SignedDuration> for Offset
Subtracts a signed duration of time from an offset. This panics on overflow.
For checked arithmetic, see Offset::checked_sub.
Source§impl Sub<SignedDuration> for Zoned
Subtracts a signed duration of time from a zoned datetime.
impl Sub<SignedDuration> for Zoned
Subtracts a signed duration of time from a zoned datetime.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Zoned::checked_sub.
Using this implementation will result in consuming the Zoned value. Since
it is not Copy, this will prevent further use. If this is undesirable,
consider using the trait implementation for &Zoned, Zoned::checked_sub
or cloning the Zoned value.
Source§impl Sub<Span> for Date
Subtracts a span of time from a date.
impl Sub<Span> for Date
Subtracts a span of time from a date.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Date::checked_sub.
Source§impl Sub<Span> for DateTime
Subtracts a span of time from a datetime.
impl Sub<Span> for DateTime
Subtracts a span of time from a datetime.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use DateTime::checked_sub.
Source§impl Sub<Span> for Time
Subtracts a span of time. This uses wrapping arithmetic.
impl Sub<Span> for Time
Subtracts a span of time. This uses wrapping arithmetic.
For checked arithmetic, see Time::checked_sub.
Source§impl Sub<Span> for Timestamp
Subtracts a span of time from a timestamp.
impl Sub<Span> for Timestamp
Subtracts a span of time from a timestamp.
This uses checked arithmetic and panics when it fails. To handle arithmetic
without panics, use Timestamp::checked_sub. Note that the failure
condition includes overflow and using a Span with non-zero units greater
than hours.
Source§impl Sub<Span> for Offset
Subtracts a span of time from an offset. This panics on overflow.
impl Sub<Span> for Offset
Subtracts a span of time from an offset. This panics on overflow.
For checked arithmetic, see Offset::checked_sub.
Source§impl Sub<DurationMillis> for TimestampMillis
impl Sub<DurationMillis> for TimestampMillis
type Output = TimestampMillis
Source§impl Sub<DurationSeconds> for TimestampSeconds
impl Sub<DurationSeconds> for TimestampSeconds
type Output = TimestampSeconds
Source§impl Sub<BigUint> for &multiversx_sc_snippets::imports::RustBigUint
impl Sub<BigUint> for &multiversx_sc_snippets::imports::RustBigUint
Source§impl<'a> Sub for &'a Zoned
Computes the span of time between two borrowed zoned datetimes.
impl<'a> Sub for &'a Zoned
Computes the span of time between two borrowed zoned datetimes.
This will return a negative span when the zoned datetime being subtracted is greater.
Since this uses the default configuration for calculating a span between
two zoned datetimes (no rounding and largest units is hours), this will
never panic or fail in any way. It is guaranteed that the largest non-zero
unit in the Span returned will be hours.
To configure the largest unit or enable rounding, use Zoned::since.
Source§impl<'a> Sub<Duration> for &'a Zoned
Subtracts an unsigned duration of time from a borrowed zoned datetime.
impl<'a> Sub<Duration> for &'a Zoned
Subtracts an unsigned duration of time from a borrowed zoned datetime.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Zoned::checked_sub.
Source§impl<'a> Sub<EdwardsPoint> for &'a EdwardsPoint
impl<'a> Sub<EdwardsPoint> for &'a EdwardsPoint
type Output = EdwardsPoint
Source§impl<'a> Sub<RistrettoPoint> for &'a RistrettoPoint
impl<'a> Sub<RistrettoPoint> for &'a RistrettoPoint
type Output = RistrettoPoint
Source§impl<'a> Sub<SignedDuration> for &'a Zoned
Subtracts a signed duration of time from a borrowed zoned datetime.
impl<'a> Sub<SignedDuration> for &'a Zoned
Subtracts a signed duration of time from a borrowed zoned datetime.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Zoned::checked_sub.
Source§impl<'a> Sub<Span> for &'a Zoned
Subtracts a span of time from a borrowed zoned datetime.
impl<'a> Sub<Span> for &'a Zoned
Subtracts a span of time from a borrowed zoned datetime.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Zoned::checked_sub.
Source§impl<'a> Sub<Span> for Zoned
Subtracts a span of time from a zoned datetime.
impl<'a> Sub<Span> for Zoned
Subtracts a span of time from a zoned datetime.
This uses checked arithmetic and panics on overflow. To handle overflow
without panics, use Zoned::checked_sub.
Using this implementation will result in consuming the Zoned value. Since
it is not Copy, this will prevent further use. If this is undesirable,
consider using the trait implementation for &Zoned, Zoned::checked_sub
or cloning the Zoned value.
Source§impl<'a, 'b> Sub<&'b EdwardsPoint> for &'a EdwardsPoint
impl<'a, 'b> Sub<&'b EdwardsPoint> for &'a EdwardsPoint
type Output = EdwardsPoint
Source§impl<'a, 'b> Sub<&'b RistrettoPoint> for &'a RistrettoPoint
impl<'a, 'b> Sub<&'b RistrettoPoint> for &'a RistrettoPoint
type Output = RistrettoPoint
Source§impl<'a, 'b> Sub<&'b AffineNielsPoint> for &'a EdwardsPoint
impl<'a, 'b> Sub<&'b AffineNielsPoint> for &'a EdwardsPoint
Source§impl<'a, 'b> Sub<&'b ProjectiveNielsPoint> for &'a EdwardsPoint
impl<'a, 'b> Sub<&'b ProjectiveNielsPoint> for &'a EdwardsPoint
Source§impl<'a, 'b, M> Sub<&'b BigInt<M>> for &'a multiversx_sc_snippets::imports::BigInt<M>where
M: ManagedTypeApi,
impl<'a, 'b, M> Sub<&'b BigInt<M>> for &'a multiversx_sc_snippets::imports::BigInt<M>where
M: ManagedTypeApi,
Source§impl<'a, 'b, M> Sub<&'b BigInt<M>> for &'a multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
impl<'a, 'b, M> Sub<&'b BigInt<M>> for &'a multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
Source§impl<'a, 'b, M> Sub<&'b BigUint<M>> for &'a multiversx_sc_snippets::imports::BigInt<M>where
M: ManagedTypeApi,
impl<'a, 'b, M> Sub<&'b BigUint<M>> for &'a multiversx_sc_snippets::imports::BigInt<M>where
M: ManagedTypeApi,
Source§impl<'a, 'b, M> Sub<&'b BigUint<M>> for &'a multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
impl<'a, 'b, M> Sub<&'b BigUint<M>> for &'a multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
Source§impl<'a, M> Sub<u32> for &'a multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Sub<u32> for &'a multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
Source§impl<'a, M> Sub<u64> for &'a multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Sub<u64> for &'a multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
Source§impl<'b> Sub<&'b EdwardsPoint> for EdwardsPoint
impl<'b> Sub<&'b EdwardsPoint> for EdwardsPoint
type Output = EdwardsPoint
Source§impl<'b> Sub<&'b RistrettoPoint> for RistrettoPoint
impl<'b> Sub<&'b RistrettoPoint> for RistrettoPoint
type Output = RistrettoPoint
Source§impl<'b, M> Sub<&'b BigUint<M>> for multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Sub<&'b BigUint<M>> for multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
Source§impl<DEC1, DEC2> Sub<ConstDecimals<DEC2>> for ConstDecimals<DEC1>
impl<DEC1, DEC2> Sub<ConstDecimals<DEC2>> for ConstDecimals<DEC1>
Source§impl<DECIMALS, M> Sub<ManagedDecimal<M, usize>> for ManagedDecimal<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Sub<ManagedDecimal<M, usize>> for ManagedDecimal<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
type Output = ManagedDecimal<M, usize>
Source§impl<DECIMALS, M> Sub<ManagedDecimal<M, ConstDecimals<DECIMALS>>> for ManagedDecimal<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Sub<ManagedDecimal<M, ConstDecimals<DECIMALS>>> for ManagedDecimal<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
type Output = ManagedDecimal<M, usize>
Source§impl<DECIMALS, M> Sub<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Sub<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
type Output = ManagedDecimalSigned<M, usize>
Source§impl<DECIMALS, M> Sub<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Sub<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
type Output = ManagedDecimalSigned<M, usize>
Source§impl<M> Sub for multiversx_sc_snippets::imports::BigInt<M>where
M: ManagedTypeApi,
impl<M> Sub for multiversx_sc_snippets::imports::BigInt<M>where
M: ManagedTypeApi,
Source§impl<M> Sub for multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
impl<M> Sub for multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
Source§impl<M> Sub for ManagedDecimal<M, usize>where
M: ManagedTypeApi,
impl<M> Sub for ManagedDecimal<M, usize>where
M: ManagedTypeApi,
type Output = ManagedDecimal<M, usize>
Source§impl<M> Sub for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
impl<M> Sub for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
type Output = ManagedDecimalSigned<M, usize>
Source§impl<M> Sub<BigInt<M>> for multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
impl<M> Sub<BigInt<M>> for multiversx_sc_snippets::imports::BigUint<M>where
M: ManagedTypeApi,
Source§impl<M> Sub<BigUint<M>> for multiversx_sc_snippets::imports::BigInt<M>where
M: ManagedTypeApi,
impl<M> Sub<BigUint<M>> for multiversx_sc_snippets::imports::BigInt<M>where
M: ManagedTypeApi,
Source§impl<M, DECIMALS> Sub for ManagedDecimal<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> Sub for ManagedDecimal<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
type Output = ManagedDecimal<M, ConstDecimals<DECIMALS>>
Source§impl<M, DECIMALS> Sub for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> Sub for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
type Output = ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
Source§impl<Ul, Bl, Ur> Sub<Ur> for UInt<Ul, Bl>
Subtracting unsigned integers. We just do our PrivateSub and then Trim the output.
impl<Ul, Bl, Ur> Sub<Ur> for UInt<Ul, Bl>
Subtracting unsigned integers. We just do our PrivateSub and then Trim the output.