Skip to main content

IsPositive

Trait IsPositive 

Source
pub trait IsPositive {
    // Required method
    fn is_positive(&self) -> bool;
}
Expand description

Trait defining instance method is_positive() : bool that indicates whether the implementing type instance has a value that is deemed to be positive.

§Additional Implementations on Foreign Types

§Built-in Types

If the feature "implement-IsPositive-for-built_ins" is defined (as it is by "default"), then this is also implemented for the following types:

Required Methods§

Source

fn is_positive(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IsPositive for f32

Source§

impl IsPositive for f64

Source§

impl IsPositive for i8

Source§

impl IsPositive for i16

Source§

impl IsPositive for i32

Source§

impl IsPositive for i64

Source§

impl IsPositive for i128

Source§

impl IsPositive for isize

Source§

impl IsPositive for u8

Source§

impl IsPositive for u16

Source§

impl IsPositive for u32

Source§

impl IsPositive for u64

Source§

impl IsPositive for u128

Source§

impl IsPositive for usize

Source§

impl<T: IsPositive + ?Sized> IsPositive for Box<T>

Available on non-crate feature nostd only.
Source§

impl<T: IsPositive + ?Sized> IsPositive for Rc<T>

Available on non-crate feature nostd only.

Implementors§