Enum time::Sign [−][src]
#[repr(i8)] pub enum Sign { Positive, Negative, Zero, }
The only use for this (obtaining the sign of a Duration
) can be replaced with Duration::is_{positive|negative|zero}
Expand description
Variants
The only use for this (obtaining the sign of a Duration
) can be replaced with Duration::is_{positive|negative|zero}
A positive value.
The only use for this (obtaining the sign of a Duration
) can be replaced with Duration::is_{positive|negative|zero}
A negative value.
The only use for this (obtaining the sign of a Duration
) can be replaced with Duration::is_{positive|negative|zero}
A value that is exactly zero.
Implementations
Return the opposite of the current sign.
assert_eq!(Sign::Positive.negate(), Sign::Negative); assert_eq!(Sign::Negative.negate(), Sign::Positive); assert_eq!(Sign::Zero.negate(), Sign::Zero);
Is the sign positive?
assert!(Sign::Positive.is_positive()); assert!(!Sign::Negative.is_positive()); assert!(!Sign::Zero.is_positive());
Is the sign negative?
assert!(!Sign::Positive.is_negative()); assert!(Sign::Negative.is_negative()); assert!(!Sign::Zero.is_negative());
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Performs the /=
operation. Read more
Performs the *=
operation. Read more
Auto Trait Implementations
impl RefUnwindSafe for Sign
impl UnwindSafe for Sign
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V