# [−][src]Trait alga::general::SubsetOf

    pub trait SubsetOf<T>: Sized {
        fn to_superset(&self) -> T;
        unsafe fn from_superset_unchecked(element: &T) -> Self;
        fn is_in_subset(element: &T) -> bool;

        fn from_superset(element: &T) -> Option<Self> { ... }
    }

Nested sets and conversions between them (using an injective mapping). Useful to work with substructures. In generic code, it is preferable to use `SupersetOf` as trait bound whenever possible instead of `SubsetOf` (because SupersetOf is automatically implemented whenever `SubsetOf` is).

The notion of "nested sets" is very broad and applies to what the types are supposed to represent, independently from their actual implementation details and limitations. For example:

- f32 and f64 are both supposed to represent reals and are thus considered equal (even if in practice f64 has more elements).
- u32 and i8 are respectively supposed to represent natural and relative numbers. Thus, u32 is a subset of i8.
- A quaternion and a 3x3 orthogonal matrix with unit determinant are both sets of rotations. They can thus be considered equal.

In other words, implementation details due to machine limitations are ignored (otherwise we could not even, e.g., convert a u64 to an i64). If considering those limitations are important, other crates allowing you to query the limitations of given types should be used.

## Required methods

### `fn to_superset(&self) -> T`

The inclusion map: converts `self` to the equivalent element of its superset.

### `unsafe fn from_superset_unchecked(element: &T) -> Self`

Use with care! Same as `self.to_superset` but without any property checks. Always succeeds.

### `fn is_in_subset(element: &T) -> bool`

Checks if `element` is actually part of the subset `Self` (and can be converted to it).

Loading content...

## Provided methods

### `fn from_superset(element: &T) -> Option<Self>`

The inverse inclusion map: attempts to construct `self` from the equivalent element of its superset.

Must return `None` if `element` has no equivalent in `Self`.

Loading content...

## Implementations on Foreign Types

### `impl SubsetOf<u8> for u8`[src]

#### `fn to_superset(&self) -> u8`[src]

#### `unsafe fn from_superset_unchecked(element: &u8) -> u8`[src]

#### `fn is_in_subset(_: &u8) -> bool`[src]

### `impl SubsetOf<u16> for u8`[src]

#### `fn to_superset(&self) -> u16`[src]

#### `unsafe fn from_superset_unchecked(element: &u16) -> u8`[src]

#### `fn is_in_subset(_: &u16) -> bool`[src]

### `impl SubsetOf<u32> for u8`[src]

#### `fn to_superset(&self) -> u32`[src]

#### `unsafe fn from_superset_unchecked(element: &u32) -> u8`[src]

#### `fn is_in_subset(_: &u32) -> bool`[src]

### `impl SubsetOf<u64> for u8`[src]

#### `fn to_superset(&self) -> u64`[src]

#### `unsafe fn from_superset_unchecked(element: &u64) -> u8`[src]

#### `fn is_in_subset(_: &u64) -> bool`[src]

### `impl SubsetOf<usize> for u8`[src]

#### `fn to_superset(&self) -> usize`[src]

#### `unsafe fn from_superset_unchecked(element: &usize) -> u8`[src]

#### `fn is_in_subset(_: &usize) -> bool`[src]

### `impl SubsetOf<i8> for u8`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> u8`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for u8`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> u8`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for u8`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> u8`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for u8`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> u8`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for u8`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> u8`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for u8`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> u8`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for u8`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> u8`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<u8> for u16`[src]

#### `fn to_superset(&self) -> u8`[src]

#### `unsafe fn from_superset_unchecked(element: &u8) -> u16`[src]

#### `fn is_in_subset(_: &u8) -> bool`[src]

### `impl SubsetOf<u16> for u16`[src]

#### `fn to_superset(&self) -> u16`[src]

#### `unsafe fn from_superset_unchecked(element: &u16) -> u16`[src]

#### `fn is_in_subset(_: &u16) -> bool`[src]

### `impl SubsetOf<u32> for u16`[src]

#### `fn to_superset(&self) -> u32`[src]

#### `unsafe fn from_superset_unchecked(element: &u32) -> u16`[src]

#### `fn is_in_subset(_: &u32) -> bool`[src]

### `impl SubsetOf<u64> for u16`[src]

#### `fn to_superset(&self) -> u64`[src]

#### `unsafe fn from_superset_unchecked(element: &u64) -> u16`[src]

#### `fn is_in_subset(_: &u64) -> bool`[src]

### `impl SubsetOf<usize> for u16`[src]

#### `fn to_superset(&self) -> usize`[src]

#### `unsafe fn from_superset_unchecked(element: &usize) -> u16`[src]

#### `fn is_in_subset(_: &usize) -> bool`[src]

### `impl SubsetOf<i8> for u16`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> u16`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for u16`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> u16`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for u16`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> u16`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for u16`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> u16`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for u16`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> u16`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for u16`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> u16`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for u16`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> u16`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<u8> for u32`[src]

#### `fn to_superset(&self) -> u8`[src]

#### `unsafe fn from_superset_unchecked(element: &u8) -> u32`[src]

#### `fn is_in_subset(_: &u8) -> bool`[src]

### `impl SubsetOf<u16> for u32`[src]

#### `fn to_superset(&self) -> u16`[src]

#### `unsafe fn from_superset_unchecked(element: &u16) -> u32`[src]

#### `fn is_in_subset(_: &u16) -> bool`[src]

### `impl SubsetOf<u32> for u32`[src]

#### `fn to_superset(&self) -> u32`[src]

#### `unsafe fn from_superset_unchecked(element: &u32) -> u32`[src]

#### `fn is_in_subset(_: &u32) -> bool`[src]

### `impl SubsetOf<u64> for u32`[src]

#### `fn to_superset(&self) -> u64`[src]

#### `unsafe fn from_superset_unchecked(element: &u64) -> u32`[src]

#### `fn is_in_subset(_: &u64) -> bool`[src]

### `impl SubsetOf<usize> for u32`[src]

#### `fn to_superset(&self) -> usize`[src]

#### `unsafe fn from_superset_unchecked(element: &usize) -> u32`[src]

#### `fn is_in_subset(_: &usize) -> bool`[src]

### `impl SubsetOf<i8> for u32`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> u32`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for u32`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> u32`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for u32`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> u32`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for u32`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> u32`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for u32`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> u32`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for u32`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> u32`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for u32`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> u32`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<u8> for u64`[src]

#### `fn to_superset(&self) -> u8`[src]

#### `unsafe fn from_superset_unchecked(element: &u8) -> u64`[src]

#### `fn is_in_subset(_: &u8) -> bool`[src]

### `impl SubsetOf<u16> for u64`[src]

#### `fn to_superset(&self) -> u16`[src]

#### `unsafe fn from_superset_unchecked(element: &u16) -> u64`[src]

#### `fn is_in_subset(_: &u16) -> bool`[src]

### `impl SubsetOf<u32> for u64`[src]

#### `fn to_superset(&self) -> u32`[src]

#### `unsafe fn from_superset_unchecked(element: &u32) -> u64`[src]

#### `fn is_in_subset(_: &u32) -> bool`[src]

### `impl SubsetOf<u64> for u64`[src]

#### `fn to_superset(&self) -> u64`[src]

#### `unsafe fn from_superset_unchecked(element: &u64) -> u64`[src]

#### `fn is_in_subset(_: &u64) -> bool`[src]

### `impl SubsetOf<usize> for u64`[src]

#### `fn to_superset(&self) -> usize`[src]

#### `unsafe fn from_superset_unchecked(element: &usize) -> u64`[src]

#### `fn is_in_subset(_: &usize) -> bool`[src]

### `impl SubsetOf<i8> for u64`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> u64`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for u64`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> u64`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for u64`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> u64`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for u64`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> u64`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for u64`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> u64`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for u64`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> u64`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for u64`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> u64`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<u8> for usize`[src]

#### `fn to_superset(&self) -> u8`[src]

#### `unsafe fn from_superset_unchecked(element: &u8) -> usize`[src]

#### `fn is_in_subset(_: &u8) -> bool`[src]

### `impl SubsetOf<u16> for usize`[src]

#### `fn to_superset(&self) -> u16`[src]

#### `unsafe fn from_superset_unchecked(element: &u16) -> usize`[src]

#### `fn is_in_subset(_: &u16) -> bool`[src]

### `impl SubsetOf<u32> for usize`[src]

#### `fn to_superset(&self) -> u32`[src]

#### `unsafe fn from_superset_unchecked(element: &u32) -> usize`[src]

#### `fn is_in_subset(_: &u32) -> bool`[src]

### `impl SubsetOf<u64> for usize`[src]

#### `fn to_superset(&self) -> u64`[src]

#### `unsafe fn from_superset_unchecked(element: &u64) -> usize`[src]

#### `fn is_in_subset(_: &u64) -> bool`[src]

### `impl SubsetOf<usize> for usize`[src]

#### `fn to_superset(&self) -> usize`[src]

#### `unsafe fn from_superset_unchecked(element: &usize) -> usize`[src]

#### `fn is_in_subset(_: &usize) -> bool`[src]

### `impl SubsetOf<i8> for usize`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> usize`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for usize`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> usize`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for usize`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> usize`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for usize`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> usize`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for usize`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> usize`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for usize`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> usize`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for usize`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> usize`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<i8> for i8`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> i8`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for i8`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> i8`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for i8`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> i8`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for i8`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> i8`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for i8`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> i8`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for i8`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> i8`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for i8`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> i8`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<i8> for i16`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> i16`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for i16`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> i16`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for i16`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> i16`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for i16`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> i16`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for i16`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> i16`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for i16`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> i16`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for i16`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> i16`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<i8> for i32`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> i32`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for i32`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> i32`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for i32`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> i32`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for i32`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> i32`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for i32`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> i32`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for i32`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> i32`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for i32`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> i32`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<i8> for i64`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> i64`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for i64`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> i64`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for i64`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> i64`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for i64`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> i64`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for i64`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> i64`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for i64`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> i64`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for i64`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> i64`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<i8> for isize`[src]

#### `fn to_superset(&self) -> i8`[src]

#### `unsafe fn from_superset_unchecked(element: &i8) -> isize`[src]

#### `fn is_in_subset(_: &i8) -> bool`[src]

### `impl SubsetOf<i16> for isize`[src]

#### `fn to_superset(&self) -> i16`[src]

#### `unsafe fn from_superset_unchecked(element: &i16) -> isize`[src]

#### `fn is_in_subset(_: &i16) -> bool`[src]

### `impl SubsetOf<i32> for isize`[src]

#### `fn to_superset(&self) -> i32`[src]

#### `unsafe fn from_superset_unchecked(element: &i32) -> isize`[src]

#### `fn is_in_subset(_: &i32) -> bool`[src]

### `impl SubsetOf<i64> for isize`[src]

#### `fn to_superset(&self) -> i64`[src]

#### `unsafe fn from_superset_unchecked(element: &i64) -> isize`[src]

#### `fn is_in_subset(_: &i64) -> bool`[src]

### `impl SubsetOf<isize> for isize`[src]

#### `fn to_superset(&self) -> isize`[src]

#### `unsafe fn from_superset_unchecked(element: &isize) -> isize`[src]

#### `fn is_in_subset(_: &isize) -> bool`[src]

### `impl SubsetOf<f32> for isize`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> isize`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for isize`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> isize`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<f32> for f32`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> f32`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for f32`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> f32`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl SubsetOf<f32> for f64`[src]

#### `fn to_superset(&self) -> f32`[src]

#### `unsafe fn from_superset_unchecked(element: &f32) -> f64`[src]

#### `fn is_in_subset(_: &f32) -> bool`[src]

### `impl SubsetOf<f64> for f64`[src]

#### `fn to_superset(&self) -> f64`[src]

#### `unsafe fn from_superset_unchecked(element: &f64) -> f64`[src]

#### `fn is_in_subset(_: &f64) -> bool`[src]

### `impl<N1, N2: SupersetOf<N1>> SubsetOf<Complex<N2>> for Complex<N1>`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> Complex<N1>`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<u8>> SubsetOf<Complex<N2>> for u8`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> u8`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<u16>> SubsetOf<Complex<N2>> for u16`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> u16`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<u32>> SubsetOf<Complex<N2>> for u32`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> u32`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<u64>> SubsetOf<Complex<N2>> for u64`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> u64`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<usize>> SubsetOf<Complex<N2>> for usize`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> usize`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<i8>> SubsetOf<Complex<N2>> for i8`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> i8`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<i16>> SubsetOf<Complex<N2>> for i16`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> i16`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<i32>> SubsetOf<Complex<N2>> for i32`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> i32`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<i64>> SubsetOf<Complex<N2>> for i64`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> i64`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<isize>> SubsetOf<Complex<N2>> for isize`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> isize`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<f32>> SubsetOf<Complex<N2>> for f32`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> f32`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

### `impl<N2: Zero + SupersetOf<f64>> SubsetOf<Complex<N2>> for f64`[src]

#### `fn to_superset(&self) -> Complex<N2>`[src]

#### `unsafe fn from_superset_unchecked(element: &Complex<N2>) -> f64`[src]

#### `fn is_in_subset(c: &Complex<N2>) -> bool`[src]

Loading content...

## Implementors

### `impl<O: Operator, T: PartialEq + Identity<O>> SubsetOf<T> for Id<O>`[src]

#### `fn to_superset(&self) -> T`[src]

#### `fn is_in_subset(t: &T) -> bool`[src]

#### `unsafe fn from_superset_unchecked(_: &T) -> Self`[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`)