Bound

Trait Bound 

Source
pub trait Bound {
    // Required methods
    fn is_lower_bounded(&self) -> bool;
    fn is_upper_bounded(&self) -> bool;
    fn lower_bound(&self) -> Option<Self>
       where Self: Sized;
    fn upper_bound(&self) -> Option<Self>
       where Self: Sized;
}
Expand description

Required Methods§

Source

fn is_lower_bounded(&self) -> bool

Returns true if the number is lower bounded.

Source

fn is_upper_bounded(&self) -> bool

Returns true if the number is upper bounded.

Source

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Returns the lower bound, if any.

Source

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Returns the upper bound, if any.

Implementations on Foreign Types§

Source§

impl Bound for f32

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for f64

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for i8

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for i16

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for i32

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for i64

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for i128

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for isize

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for u8

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for u16

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for u32

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for u64

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for u128

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for usize

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for IBig

Available on crate feature dashu-int only.
Source§

impl Bound for UBig

Available on crate feature dashu-int only.
Source§

impl Bound for bf16

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for f16

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for TwoFloat

Source§

fn is_lower_bounded(&self) -> bool

Source§

fn is_upper_bounded(&self) -> bool

Source§

fn lower_bound(&self) -> Option<Self>
where Self: Sized,

Source§

fn upper_bound(&self) -> Option<Self>
where Self: Sized,

Source§

impl Bound for NonZeroI8

Source§

impl Bound for NonZeroI16

Source§

impl Bound for NonZeroI32

Source§

impl Bound for NonZeroI64

Source§

impl Bound for NonZeroI128

Source§

impl Bound for NonZeroIsize

Source§

impl Bound for NonZeroU8

Source§

impl Bound for NonZeroU16

Source§

impl Bound for NonZeroU32

Source§

impl Bound for NonZeroU64

Source§

impl Bound for NonZeroU128

Source§

impl Bound for NonZeroUsize

Implementors§

Source§

impl Bound for NegativeIntegers

This implementation defers to the actual integer variant.

Source§

impl Bound for NonNegativeIntegers

This implementation defers to the actual integer variant.

Source§

impl Bound for NonPositiveIntegers

This implementation defers to the actual integer variant.

Source§

impl Bound for NonZeroIntegers

This implementation defers to the actual integer variant.

Source§

impl Bound for PositiveIntegers

This implementation defers to the actual integer variant.

Source§

impl Bound for AllIntegers

This implementation defers to the actual integer variant.

Source§

impl Bound for AllRationals

This implementation defers to the actual rational variant.

Source§

impl Bound for Integers

This implementation defers to the actual integer variant.

Source§

impl Bound for Primes

This implementation defers to the actual integer variant.

Source§

impl Bound for Rationals

This implementation defers to the actual rational variant.

Source§

impl Bound for BrainFloat16

Source§

impl Bound for DecFloat32

Available on crate feature decstr only.
Source§

impl Bound for DecFloat64

Available on crate feature decstr only.
Source§

impl Bound for DecFloat128

Available on crate feature decstr only.
Source§

impl Bound for Float16

Source§

impl Bound for Float32

Source§

impl Bound for Float64

Source§

impl Bound for Integer8

Source§

impl Bound for Integer16

Source§

impl Bound for Integer128

Source§

impl Bound for IntegerBig

Available on crate feature dashu-int only.
Source§

impl Bound for NegativeInteger8

Source§

impl Bound for NegativeInteger16

Source§

impl Bound for NegativeInteger32

Source§

impl Bound for NegativeInteger64

Source§

impl Bound for NegativeInteger128

Source§

impl Bound for NonNegativeInteger8

Source§

impl Bound for NonNegativeInteger16

Source§

impl Bound for NonNegativeInteger32

Source§

impl Bound for NonNegativeInteger64

Source§

impl Bound for NonNegativeInteger128

Source§

impl Bound for NonPositiveInteger8

Source§

impl Bound for NonPositiveInteger16

Source§

impl Bound for NonPositiveInteger32

Source§

impl Bound for NonPositiveInteger64

Source§

impl Bound for NonPositiveInteger128

Source§

impl Bound for NonZeroInteger8

Source§

impl Bound for NonZeroInteger16

Source§

impl Bound for NonZeroInteger32

Source§

impl Bound for NonZeroInteger64

Source§

impl Bound for NonZeroInteger128

Source§

impl Bound for PositiveInteger8

Source§

impl Bound for PositiveInteger16

Source§

impl Bound for PositiveInteger32

Source§

impl Bound for PositiveInteger64

Source§

impl Bound for PositiveInteger128

Source§

impl Bound for Prime8

Source§

impl Bound for Prime64

Source§

impl Bound for Prime128

Source§

impl Bound for Rational8

Source§

impl Bound for Rational16

Source§

impl Bound for Rational128

Source§

impl Bound for TwoFloat128

Source§

impl Bound for Integer32

Source§

impl Bound for Integer64

Source§

impl Bound for Prime16

Source§

impl Bound for Prime32

Source§

impl Bound for Rational32

Source§

impl Bound for Rational64

Source§

impl Bound for NoNumber

Source§

impl<N: Number> Bound for AllNumbers<N>

This implementation defers to the actual number variant.