# Crate num_traits [−] [src]

Numeric traits for generic mathematics

## Reexports

`pub use bounds::Bounded;`
`pub use float::Float;`
`pub use float::FloatConst;`
`pub use identities::Zero;`
`pub use identities::One;`
`pub use identities::zero;`
`pub use identities::one;`
`pub use ops::checked::*;`
`pub use ops::wrapping::*;`
`pub use ops::saturating::Saturating;`
`pub use sign::Signed;`
`pub use sign::Unsigned;`
`pub use sign::abs;`
`pub use sign::abs_sub;`
`pub use sign::signum;`
`pub use cast::*;`
`pub use int::PrimInt;`
`pub use pow::pow;`
`pub use pow::checked_pow;`

## Modules

bounds |
cast |
float |
identities |
int |
ops |
pow |
sign |

## Structs

ParseFloatError |

## Enums

FloatErrorKind |

## Traits

Num | The base trait for numeric types, covering `0` and `1` values, comparisons, basic numeric operations, and string conversion.
NumAssign | The trait for `Num` types which also implement assignment operators.
NumAssignOps | The trait for types implementing numeric assignment operators (like `+=`).
NumAssignRef | The trait for `NumAssign` types which also implement assignment operations taking the second operand by reference.
NumOps | The trait for types implementing basic numeric operations
NumRef | The trait for `Num` types which also implement numeric operations taking the second operand by reference.
RefNum | The trait for references which implement numeric operations, taking the second operand either by value or by reference.

## Functions

clamp | A value bounded by a minimum and a maximum

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)