Skip to main content

SignedOne

Enum SignedOne 

Source
pub enum SignedOne {
    PlusOne = 1,
    MinusOne = -1,
}
Expand description

§SignedOne

A number that is either 1 or -1, stored in a single byte.

Can be used when a type from the MatrixProvider can only have the value 1 or -1, such as with some network problems, where an arc is either incoming or outgoing. The incidence matrix of a network holds nothing but these two values, and storing a rational number for each of them wastes both space and time. This type stores the coefficient in a byte and lets Absorb apply it to a wide accumulator directly: multiplying by PlusOne is a clone, multiplying by MinusOne is a clone and a sign flip, never a multiplication.

The variants are not declared in increasing numeric order, so the derived Ord would be wrong; the impl below compares the discriminants instead, like Sign does.

Variants§

§

PlusOne = 1

+1.

§

MinusOne = -1

-1.

Trait Implementations§

Source§

impl Absorb<SignedOne> for Rational8

Source§

fn from_narrow(narrow: &SignedOne) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &SignedOne)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &SignedOne)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &SignedOne) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &SignedOne, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Absorb<SignedOne> for Rational16

Source§

fn from_narrow(narrow: &SignedOne) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &SignedOne)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &SignedOne)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &SignedOne) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &SignedOne, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Absorb<SignedOne> for Rational32

Source§

fn from_narrow(narrow: &SignedOne) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &SignedOne)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &SignedOne)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &SignedOne) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &SignedOne, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Absorb<SignedOne> for Rational64

Source§

fn from_narrow(narrow: &SignedOne) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &SignedOne)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &SignedOne)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &SignedOne) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &SignedOne, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Absorb<SignedOne> for Rational128

Source§

fn from_narrow(narrow: &SignedOne) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &SignedOne)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &SignedOne)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &SignedOne) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &SignedOne, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl<const S: usize> Absorb<SignedOne> for Big<S>

Source§

fn from_narrow(narrow: &SignedOne) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &SignedOne)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &SignedOne)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &SignedOne) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &SignedOne, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Add<&SignedOne> for i8

Source§

type Output = i8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&SignedOne> for i16

Source§

type Output = i16

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&SignedOne> for i32

Source§

type Output = i32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&SignedOne> for i64

Source§

type Output = i64

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&SignedOne> for i128

Source§

type Output = i128

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&SignedOne> for u8

Source§

type Output = u8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&SignedOne> for u16

Source§

type Output = u16

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&SignedOne> for u32

Source§

type Output = u32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&SignedOne> for u64

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&SignedOne> for u128

Source§

type Output = u128

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for i8

Source§

type Output = i8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for i16

Source§

type Output = i16

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for i32

Source§

type Output = i32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for i64

Source§

type Output = i64

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for i128

Source§

type Output = i128

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for u8

Source§

type Output = u8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for u16

Source§

type Output = u16

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for u32

Source§

type Output = u32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for u64

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<SignedOne> for u128

Source§

type Output = u128

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign<&SignedOne> for i8

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<&SignedOne> for i16

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<&SignedOne> for i32

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<&SignedOne> for i64

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<&SignedOne> for i128

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<&SignedOne> for u8

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<&SignedOne> for u16

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<&SignedOne> for u32

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<&SignedOne> for u64

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<&SignedOne> for u128

Source§

fn add_assign(&mut self, rhs: &SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for i8

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for i16

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for i32

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for i64

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for i128

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for u8

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for u16

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for u32

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for u64

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl AddAssign<SignedOne> for u128

Source§

fn add_assign(&mut self, rhs: SignedOne)

Performs the += operation. Read more
Source§

impl Clone for SignedOne

Source§

fn clone(&self) -> Self

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 Copy for SignedOne

Source§

impl Debug for SignedOne

Debug forwards to Display, because 1 and -1 read better in test output than the variant names.

Source§

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

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

impl Default for SignedOne

Source§

fn default() -> Self

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

impl Display for SignedOne

Source§

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

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

impl Div<&SignedOne> for i8

Source§

type Output = i8

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&SignedOne> for i16

Source§

type Output = i16

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&SignedOne> for i32

Source§

type Output = i32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&SignedOne> for i64

Source§

type Output = i64

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&SignedOne> for i128

Source§

type Output = i128

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<SignedOne> for i8

Source§

type Output = i8

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<SignedOne> for i16

Source§

type Output = i16

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<SignedOne> for i32

Source§

type Output = i32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<SignedOne> for i64

Source§

type Output = i64

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<SignedOne> for i128

Source§

type Output = i128

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign<&SignedOne> for i8

Source§

fn div_assign(&mut self, rhs: &SignedOne)

Performs the /= operation. Read more
Source§

impl DivAssign<&SignedOne> for i16

Source§

fn div_assign(&mut self, rhs: &SignedOne)

Performs the /= operation. Read more
Source§

impl DivAssign<&SignedOne> for i32

Source§

fn div_assign(&mut self, rhs: &SignedOne)

Performs the /= operation. Read more
Source§

impl DivAssign<&SignedOne> for i64

Source§

fn div_assign(&mut self, rhs: &SignedOne)

Performs the /= operation. Read more
Source§

impl DivAssign<&SignedOne> for i128

Source§

fn div_assign(&mut self, rhs: &SignedOne)

Performs the /= operation. Read more
Source§

impl DivAssign<SignedOne> for i8

Source§

fn div_assign(&mut self, rhs: SignedOne)

Performs the /= operation. Read more
Source§

impl DivAssign<SignedOne> for i16

Source§

fn div_assign(&mut self, rhs: SignedOne)

Performs the /= operation. Read more
Source§

impl DivAssign<SignedOne> for i32

Source§

fn div_assign(&mut self, rhs: SignedOne)

Performs the /= operation. Read more
Source§

impl DivAssign<SignedOne> for i64

Source§

fn div_assign(&mut self, rhs: SignedOne)

Performs the /= operation. Read more
Source§

impl DivAssign<SignedOne> for i128

Source§

fn div_assign(&mut self, rhs: SignedOne)

Performs the /= operation. Read more
Source§

impl Eq for SignedOne

Source§

impl From<&SignedOne> for i8

Source§

fn from(rhs: &SignedOne) -> Self

Converts to this type from the input type.
Source§

impl From<&SignedOne> for i16

Source§

fn from(rhs: &SignedOne) -> Self

Converts to this type from the input type.
Source§

impl From<&SignedOne> for i32

Source§

fn from(rhs: &SignedOne) -> Self

Converts to this type from the input type.
Source§

impl From<&SignedOne> for i64

Source§

fn from(rhs: &SignedOne) -> Self

Converts to this type from the input type.
Source§

impl From<&SignedOne> for i128

Source§

fn from(rhs: &SignedOne) -> Self

Converts to this type from the input type.
Source§

impl From<SignedOne> for i8

Source§

fn from(rhs: SignedOne) -> Self

Converts to this type from the input type.
Source§

impl From<SignedOne> for i16

Source§

fn from(rhs: SignedOne) -> Self

Converts to this type from the input type.
Source§

impl From<SignedOne> for i32

Source§

fn from(rhs: SignedOne) -> Self

Converts to this type from the input type.
Source§

impl From<SignedOne> for i64

Source§

fn from(rhs: SignedOne) -> Self

Converts to this type from the input type.
Source§

impl From<SignedOne> for i128

Source§

fn from(rhs: SignedOne) -> Self

Converts to this type from the input type.
Source§

impl Hash for SignedOne

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 Mul for SignedOne

Source§

type Output = SignedOne

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for i8

Source§

type Output = i8

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for &i8

Source§

type Output = i8

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for i16

Source§

type Output = i16

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for &i16

Source§

type Output = i16

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for i32

Source§

type Output = i32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for &i32

Source§

type Output = i32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for i64

Source§

type Output = i64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for &i64

Source§

type Output = i64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for i128

Source§

type Output = i128

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SignedOne> for &i128

Source§

type Output = i128

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<SignedOne> for i8

Source§

type Output = i8

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<SignedOne> for i16

Source§

type Output = i16

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<SignedOne> for i32

Source§

type Output = i32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<SignedOne> for i64

Source§

type Output = i64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<SignedOne> for i128

Source§

type Output = i128

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign<&SignedOne> for i8

Source§

fn mul_assign(&mut self, rhs: &SignedOne)

Performs the *= operation. Read more
Source§

impl MulAssign<&SignedOne> for i16

Source§

fn mul_assign(&mut self, rhs: &SignedOne)

Performs the *= operation. Read more
Source§

impl MulAssign<&SignedOne> for i32

Source§

fn mul_assign(&mut self, rhs: &SignedOne)

Performs the *= operation. Read more
Source§

impl MulAssign<&SignedOne> for i64

Source§

fn mul_assign(&mut self, rhs: &SignedOne)

Performs the *= operation. Read more
Source§

impl MulAssign<&SignedOne> for i128

Source§

fn mul_assign(&mut self, rhs: &SignedOne)

Performs the *= operation. Read more
Source§

impl MulAssign<SignedOne> for i8

Source§

fn mul_assign(&mut self, rhs: SignedOne)

Performs the *= operation. Read more
Source§

impl MulAssign<SignedOne> for i16

Source§

fn mul_assign(&mut self, rhs: SignedOne)

Performs the *= operation. Read more
Source§

impl MulAssign<SignedOne> for i32

Source§

fn mul_assign(&mut self, rhs: SignedOne)

Performs the *= operation. Read more
Source§

impl MulAssign<SignedOne> for i64

Source§

fn mul_assign(&mut self, rhs: SignedOne)

Performs the *= operation. Read more
Source§

impl MulAssign<SignedOne> for i128

Source§

fn mul_assign(&mut self, rhs: SignedOne)

Performs the *= operation. Read more
Source§

impl Neg for SignedOne

Source§

type Output = SignedOne

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Negateable for SignedOne

Both negations are representable: PlusOne and MinusOne are each other’s additive inverse.

Source§

fn negate(&mut self)

Negate the number, e.g. go from 1 to -1. Read more
Source§

impl NonZero for SignedOne

Source§

fn is_not_zero(&self) -> bool

Whether the value is not equal to zero. Read more
Source§

impl NonZeroSigned for SignedOne

The type cannot represent zero, so there is no failure case.

Source§

fn non_zero_signum(&self) -> NonZeroSign

Whether the value is positive or negative.
Source§

fn non_zero_is_positive(&self) -> bool

Whether x > 0.
Source§

fn non_zero_is_negative(&self) -> bool

Whether x < 0.
Source§

impl One for SignedOne

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
Source§

impl Ord for SignedOne

The variants are declared with PlusOne first, so a derived Ord would order PlusOne before MinusOne. Compare the discriminants instead, which gives MinusOne < PlusOne.

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for SignedOne

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for SignedOne

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Signed for SignedOne

This type is positive or negative; it is never zero.

Source§

fn signum(&self) -> Sign

Returns the sign of the number.
Source§

fn is_positive(&self) -> bool

Whether the number is (strictly) greater than zero.
Source§

fn is_negative(&self) -> bool

Whether the number is (strictly) smaller than zero.
Source§

impl StructuralPartialEq for SignedOne

Source§

impl Sub<&SignedOne> for i8

Source§

type Output = i8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&SignedOne> for i16

Source§

type Output = i16

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&SignedOne> for i32

Source§

type Output = i32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&SignedOne> for i64

Source§

type Output = i64

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&SignedOne> for i128

Source§

type Output = i128

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&SignedOne> for u8

Source§

type Output = u8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&SignedOne> for u16

Source§

type Output = u16

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&SignedOne> for u32

Source§

type Output = u32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&SignedOne> for u64

Source§

type Output = u64

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&SignedOne> for u128

Source§

type Output = u128

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for i8

Source§

type Output = i8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for i16

Source§

type Output = i16

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for i32

Source§

type Output = i32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for i64

Source§

type Output = i64

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for i128

Source§

type Output = i128

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for u8

Source§

type Output = u8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for u16

Source§

type Output = u16

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for u32

Source§

type Output = u32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for u64

Source§

type Output = u64

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<SignedOne> for u128

Source§

type Output = u128

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign<&SignedOne> for i8

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<&SignedOne> for i16

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<&SignedOne> for i32

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<&SignedOne> for i64

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<&SignedOne> for i128

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<&SignedOne> for u8

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<&SignedOne> for u16

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<&SignedOne> for u32

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<&SignedOne> for u64

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<&SignedOne> for u128

Source§

fn sub_assign(&mut self, rhs: &SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for i8

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for i16

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for i32

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for i64

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for i128

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for u8

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for u16

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for u32

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for u64

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more
Source§

impl SubAssign<SignedOne> for u128

Source§

fn sub_assign(&mut self, rhs: SignedOne)

Performs the -= operation. Read more

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.