# Trait bitflags::__core::ops::Div [−] [src]

    pub trait Div<RHS = Self> {
        type Output;
        fn div(self, rhs: RHS) -> Self::Output;
    }

The `Div` trait is used to specify the functionality of `/`.

# Examples

A trivial implementation of `Div`. When `Foo / Foo` happens, it ends up calling `div`, and therefore, `main` prints `Dividing!`.

    use std::ops::Div;

    struct Foo;

    impl Div for Foo {
        type Output = Foo;

        fn div(self, _rhs: Foo) -> Foo {
            println!("Dividing!");
            self
        }
    }

    fn main() {
        Foo / Foo;
    }

## Associated Types

### `type Output`

The resulting type after applying the `/` operator

## Required Methods

### `fn div(self, rhs: RHS) -> Self::Output`

The method for the `/` operator

## Implementors

- `impl Div for Duration`
- `impl Div for usize`
- `impl<'a> Div for &'a usize`
- `impl<'a> Div for usize`
- `impl<'a, 'b> Div for &'b usize`
- `impl Div for u8`
- `impl<'a> Div for &'a u8`
- `impl<'a> Div for u8`
- `impl<'a, 'b> Div for &'b u8`
- `impl Div for u16`
- `impl<'a> Div for &'a u16`
- `impl<'a> Div for u16`
- `impl<'a, 'b> Div for &'b u16`
- `impl Div for u32`
- `impl<'a> Div for &'a u32`
- `impl<'a> Div for u32`
- `impl<'a, 'b> Div for &'b u32`
- `impl Div for u64`
- `impl<'a> Div for &'a u64`
- `impl<'a> Div for u64`
- `impl<'a, 'b> Div for &'b u64`
- `impl Div for isize`
- `impl<'a> Div for &'a isize`
- `impl<'a> Div for isize`
- `impl<'a, 'b> Div for &'b isize`
- `impl Div for i8`
- `impl<'a> Div for &'a i8`
- `impl<'a> Div for i8`
- `impl<'a, 'b> Div for &'b i8`
- `impl Div for i16`
- `impl<'a> Div for &'a i16`
- `impl<'a> Div for i16`
- `impl<'a, 'b> Div for &'b i16`
- `impl Div for i32`
- `impl<'a> Div for &'a i32`
- `impl<'a> Div for i32`
- `impl<'a, 'b> Div for &'b i32`
- `impl Div for i64`
- `impl<'a> Div for &'a i64`
- `impl<'a> Div for i64`
- `impl<'a, 'b> Div for &'b i64`
- `impl Div for f32`
- `impl<'a> Div for &'a f32`
- `impl<'a> Div for f32`
- `impl<'a, 'b> Div for &'b f32`
- `impl Div for f64`
- `impl<'a> Div for &'a f64`
- `impl<'a> Div for f64`
- `impl<'a, 'b> Div for &'b f64`
- `impl Div for Wrapping<usize>`
- `impl Div for Wrapping<u8>`
- `impl Div for Wrapping<u16>`
- `impl Div for Wrapping<u32>`
- `impl Div for Wrapping<u64>`
- `impl Div for Wrapping<isize>`
- `impl Div for Wrapping<i8>`
- `impl Div for Wrapping<i16>`
- `impl Div for Wrapping<i32>`
- `impl Div for Wrapping<i64>`

# 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

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