# Trait std::num::Zero [−] [src]

    pub trait Zero {
        fn zero() -> Self;
    }

Deprecated since 1.11.0

: no longer used for Iterator::sum

🔬 This is a nightly-only experimental API. (`zero_one` #27739)

unsure of placement, wants to use associated constants

Types that have a "zero" value.

This trait is intended for use in conjunction with `Add`, as an identity: `x + T::zero() == x`.

## Required Methods

### `fn zero() -> Self`

Deprecated since 1.11.0

: no longer used for Iterator::sum

🔬 This is a nightly-only experimental API. (`zero_one` #27739)

unsure of placement, wants to use associated constants

The "zero" (usually, additive identity) for this type.

## Implementors

- `impl Zero for u8`
- `impl Zero for u16`
- `impl Zero for u32`
- `impl Zero for u64`
- `impl Zero for usize`
- `impl Zero for i8`
- `impl Zero for i16`
- `impl Zero for i32`
- `impl Zero for i64`
- `impl Zero for isize`
- `impl Zero for u128`
- `impl Zero for i128`
- `impl Zero for f32`
- `impl Zero for f64`

# 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`)