# [−][src]Trait typenum::marker_traits::Integer

    pub trait Integer {
        const I8: i8;
        const I16: i16;
        const I32: i32;
        const I64: i64;
        const ISIZE: isize;

        fn to_i8() -> i8;
        fn to_i16() -> i16;
        fn to_i32() -> i32;
        fn to_i64() -> i64;
        fn to_isize() -> isize;
    }

The marker trait for compile time signed integers.

This trait should not be implemented for anything outside this crate.

# Example

    use typenum::{P3, Integer};

    assert_eq!(P3::to_i32(), 3);
    assert_eq!(P3::I32, 3);

## Associated Constants

### `const I8: i8`

### `const I16: i16`

### `const I32: i32`

### `const I64: i64`

### `const ISIZE: isize`

Loading content...

## Required methods

### `fn to_i8() -> i8`

### `fn to_i16() -> i16`

### `fn to_i32() -> i32`

### `fn to_i64() -> i64`

### `fn to_isize() -> isize`

Loading content...

## Implementors

### `impl Integer for Z0`[src]

#### `const I8: i8`[src]

#### `const I16: i16`[src]

#### `const I32: i32`[src]

#### `const I64: i64`[src]

#### `const ISIZE: isize`[src]

#### `fn to_i8() -> i8`[src]

#### `fn to_i16() -> i16`[src]

#### `fn to_i32() -> i32`[src]

#### `fn to_i64() -> i64`[src]

#### `fn to_isize() -> isize`[src]

### `impl<U: Unsigned + NonZero> Integer for NInt<U>`[src]

#### `const I8: i8`[src]

#### `const I16: i16`[src]

#### `const I32: i32`[src]

#### `const I64: i64`[src]

#### `const ISIZE: isize`[src]

#### `fn to_i8() -> i8`[src]

#### `fn to_i16() -> i16`[src]

#### `fn to_i32() -> i32`[src]

#### `fn to_i64() -> i64`[src]

#### `fn to_isize() -> isize`[src]

### `impl<U: Unsigned + NonZero> Integer for PInt<U>`[src]

#### `const I8: i8`[src]

#### `const I16: i16`[src]

#### `const I32: i32`[src]

#### `const I64: i64`[src]

#### `const ISIZE: isize`[src]

#### `fn to_i8() -> i8`[src]

#### `fn to_i16() -> i16`[src]

#### `fn to_i32() -> i32`[src]

#### `fn to_i64() -> i64`[src]

#### `fn to_isize() -> isize`[src]

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse 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`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)