# Trait bitflags::__core::prelude::v1::PartialOrd [−] [src]

    pub trait PartialOrd<Rhs = Self>: PartialEq<Rhs> where Rhs: ?Sized {
        fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;

        fn lt(&self, other: &Rhs) -> bool { ... }
        fn le(&self, other: &Rhs) -> bool { ... }
        fn gt(&self, other: &Rhs) -> bool { ... }
        fn ge(&self, other: &Rhs) -> bool { ... }
    }

Trait for values that can be compared for a sort-order.

The comparison must satisfy, for all `a`, `b` and `c`:

- antisymmetry: if `a < b` then `!(a > b)`, as well as `a > b` implying `!(a < b)`; and
- transitivity: `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.

Note that these requirements mean that the trait itself must be implemented symmetrically and transitively: if `T: PartialOrd<U>` and `U: PartialOrd<V>` then `U: PartialOrd<T>` and `T: PartialOrd<V>`.

PartialOrd only requires implementation of the `partial_cmp` method, with the others generated from default implementations.

However it remains possible to implement the others separately for types which do not have a total order. For example, for floating point numbers, `NaN < 0 == false` and `NaN >= 0 == false` (cf. IEEE 754-2008 section 5.11).

This trait can be used with `#[derive]`. When `derive`d, it will produce an ordering based on the top-to-bottom declaration order of the struct's members.

# Examples

    let x : u32 = 0;
    let y : u32 = 1;

    assert_eq!(x < y, true);
    assert_eq!(x.lt(&y), true);

## Required Methods

### `fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>`

This method returns an ordering between `self` and `other` values if one exists.

# Examples

    use std::cmp::Ordering;

    let result = 1.0.partial_cmp(&2.0);
    assert_eq!(result, Some(Ordering::Less));

    let result = 1.0.partial_cmp(&1.0);
    assert_eq!(result, Some(Ordering::Equal));

    let result = 2.0.partial_cmp(&1.0);
    assert_eq!(result, Some(Ordering::Greater));

When comparison is impossible:

    let result = std::f64::NAN.partial_cmp(&1.0);
    assert_eq!(result, None);

## Provided Methods

### `fn lt(&self, other: &Rhs) -> bool`

This method tests less than (for `self` and `other`) and is used by the `<` operator.

# Examples

    let result = 1.0 < 2.0;
    assert_eq!(result, true);

    let result = 2.0 < 1.0;
    assert_eq!(result, false);

### `fn le(&self, other: &Rhs) -> bool`

This method tests less than or equal to (for `self` and `other`) and is used by the `<=` operator.

# Examples

    let result = 1.0 <= 2.0;
    assert_eq!(result, true);

    let result = 2.0 <= 2.0;
    assert_eq!(result, true);

### `fn gt(&self, other: &Rhs) -> bool`

This method tests greater than (for `self` and `other`) and is used by the `>` operator.

# Examples

    let result = 1.0 > 2.0;
    assert_eq!(result, false);

    let result = 2.0 > 2.0;
    assert_eq!(result, false);

### `fn ge(&self, other: &Rhs) -> bool`

This method tests greater than or equal to (for `self` and `other`) and is used by the `>=` operator.

# Examples

    let result = 2.0 >= 1.0;
    assert_eq!(result, true);

    let result = 2.0 >= 2.0;
    assert_eq!(result, true);

## Implementors

- `impl<A> PartialOrd for LinkedList<A> where A: PartialOrd<A>`
- `impl<A> PartialOrd for VecDeque<A> where A: PartialOrd<A>`
- `impl PartialOrd for CString`
- `impl PartialOrd for CStr`
- `impl PartialOrd for OsString`
- `impl PartialOrd for OsString`
- `impl PartialOrd for OsStr`
- `impl PartialOrd for OsStr`
- `impl<'a, 'b> PartialOrd for OsString`
- `impl<'a, 'b> PartialOrd for OsStr`
- `impl<'a, 'b> PartialOrd for OsString`
- `impl<'a, 'b> PartialOrd for &'a OsStr`
- `impl<'a, 'b> PartialOrd for Cow<'a, OsStr>`
- `impl<'a, 'b> PartialOrd for OsStr`
- `impl<'a, 'b> PartialOrd for Cow<'a, OsStr>`
- `impl<'a, 'b> PartialOrd for &'b OsStr`
- `impl<'a, 'b> PartialOrd for Cow<'a, OsStr>`
- `impl<'a, 'b> PartialOrd for OsString`
- `impl PartialOrd for IpAddr`
- `impl PartialOrd for Ipv4Addr`
- `impl PartialOrd for Ipv6Addr`
- `impl<'a> PartialOrd for Prefix<'a>`
- `impl<'a> PartialOrd for PrefixComponent<'a>`
- `impl<'a> PartialOrd for Component<'a>`
- `impl<'a> PartialOrd for Components<'a>`
- `impl PartialOrd for PathBuf`
- `impl PartialOrd for Path`
- `impl<'a, 'b> PartialOrd for PathBuf`
- `impl<'a, 'b> PartialOrd for Path`
- `impl<'a, 'b> PartialOrd for PathBuf`
- `impl<'a, 'b> PartialOrd for &'a Path`
- `impl<'a, 'b> PartialOrd for Cow<'a, Path>`
- `impl<'a, 'b> PartialOrd for Path`
- `impl<'a, 'b> PartialOrd for Cow<'a, Path>`
- `impl<'a, 'b> PartialOrd for &'b Path`
- `impl<'a, 'b> PartialOrd for Cow<'a, Path>`
- `impl<'a, 'b> PartialOrd for PathBuf`
- `impl<'a, 'b> PartialOrd for PathBuf`
- `impl<'a, 'b> PartialOrd for OsStr`
- `impl<'a, 'b> PartialOrd for PathBuf`
- `impl<'a, 'b> PartialOrd for &'a OsStr`
- `impl<'a, 'b> PartialOrd for PathBuf`
- `impl<'a, 'b> PartialOrd for Cow<'a, OsStr>`
- `impl<'a, 'b> PartialOrd for PathBuf`
- `impl<'a, 'b> PartialOrd for OsString`
- `impl<'a, 'b> PartialOrd for Path`
- `impl<'a, 'b> PartialOrd for OsStr`
- `impl<'a, 'b> PartialOrd for Path`
- `impl<'a, 'b> PartialOrd for &'a OsStr`
- `impl<'a, 'b> PartialOrd for Path`
- `impl<'a, 'b> PartialOrd for Cow<'a, OsStr>`
- `impl<'a, 'b> PartialOrd for Path`
- `impl<'a, 'b> PartialOrd for OsString`
- `impl<'a, 'b> PartialOrd for &'a Path`
- `impl<'a, 'b> PartialOrd for OsStr`
- `impl<'a, 'b> PartialOrd for &'a Path`
- `impl<'a, 'b> PartialOrd for Cow<'b, OsStr>`
- `impl<'a, 'b> PartialOrd for &'a Path`
- `impl<'a, 'b> PartialOrd for OsString`
- `impl<'a, 'b> PartialOrd for Cow<'a, Path>`
- `impl<'a, 'b> PartialOrd for OsStr`
- `impl<'a, 'b> PartialOrd for Cow<'a, Path>`
- `impl<'a, 'b> PartialOrd for &'b OsStr`
- `impl<'a, 'b> PartialOrd for Cow<'a, Path>`
- `impl<'a, 'b> PartialOrd for OsString`
- `impl PartialOrd for Duration`
- `impl PartialOrd for Instant`
- `impl PartialOrd for SystemTime`
- `impl<T> PartialOrd for Vec<T> where T: PartialOrd<T>`
- `impl PartialOrd for Ordering`
- `impl PartialOrd for ()`
- `impl PartialOrd for bool`
- `impl PartialOrd for f32`
- `impl PartialOrd for f64`
- `impl PartialOrd for char`
- `impl PartialOrd for usize`
- `impl PartialOrd for u8`
- `impl PartialOrd for u16`
- `impl PartialOrd for u32`
- `impl PartialOrd for u64`
- `impl PartialOrd for isize`
- `impl PartialOrd for i8`
- `impl PartialOrd for i16`
- `impl PartialOrd for i32`
- `impl PartialOrd for i64`
- `impl<'a, 'b, A, B> PartialOrd for &'a A where A: PartialOrd<B> + ?Sized, B: ?Sized`
- `impl<'a, 'b, A, B> PartialOrd for &'a mut A where B: ?Sized, A: PartialOrd<B> + ?Sized`
- `impl<T> PartialOrd for Box<T> where T: PartialOrd<T> + ?Sized`
- `impl<T> PartialOrd for PhantomData<T> where T: ?Sized`
- `impl<T> PartialOrd for Rc<T> where T: PartialOrd<T> + ?Sized`
- `impl PartialOrd for String`
- `impl<T, E> PartialOrd for Result<T, E> where T: PartialOrd<T>, E: PartialOrd<E>`
- `impl<Ret> PartialOrd for fn() -> Ret`
- `impl<Ret> PartialOrd for extern fn() -> Ret`
- `impl<Ret> PartialOrd for unsafe fn() -> Ret`
- `impl<Ret> PartialOrd for unsafe extern fn() -> Ret`
- `impl<Ret, A> PartialOrd for fn(A) -> Ret`
- `impl<Ret, A> PartialOrd for extern fn(A) -> Ret`
- `impl<Ret, A> PartialOrd for unsafe fn(A) -> Ret`
- `impl<Ret, A> PartialOrd for unsafe extern fn(A) -> Ret`
- `impl<Ret, A, B> PartialOrd for fn(A, B) -> Ret`
- `impl<Ret, A, B> PartialOrd for extern fn(A, B) -> Ret`
- `impl<Ret, A, B> PartialOrd for unsafe fn(A, B) -> Ret`
- `impl<Ret, A, B> PartialOrd for unsafe extern fn(A, B) -> Ret`
- `impl<Ret, A, B, C> PartialOrd for fn(A, B, C) -> Ret`
- `impl<Ret, A, B, C> PartialOrd for extern fn(A, B, C) -> Ret`
- `impl<Ret, A, B, C> PartialOrd for unsafe fn(A, B, C) -> Ret`
- `impl<Ret, A, B, C> PartialOrd for unsafe extern fn(A, B, C) -> Ret`
- `impl<Ret, A, B, C, D> PartialOrd for fn(A, B, C, D) -> Ret`
- `impl<Ret, A, B, C, D> PartialOrd for extern fn(A, B, C, D) -> Ret`
- `impl<Ret, A, B, C, D> PartialOrd for unsafe fn(A, B, C, D) -> Ret`
- `impl<Ret, A, B, C, D> PartialOrd for unsafe extern fn(A, B, C, D) -> Ret`
- `impl<Ret, A, B, C, D, E> PartialOrd for fn(A, B, C, D, E) -> Ret`
- `impl<Ret, A, B, C, D, E> PartialOrd for extern fn(A, B, C, D, E) -> Ret`
- `impl<Ret, A, B, C, D, E> PartialOrd for unsafe fn(A, B, C, D, E) -> Ret`
- `impl<Ret, A, B, C, D, E> PartialOrd for unsafe extern fn(A, B, C, D, E) -> Ret`
- `impl<Ret, A, B, C, D, E, F> PartialOrd for fn(A, B, C, D, E, F) -> Ret`
- `impl<Ret, A, B, C, D, E, F> PartialOrd for extern fn(A, B, C, D, E, F) -> Ret`
- `impl<Ret, A, B, C, D, E, F> PartialOrd for unsafe fn(A, B, C, D, E, F) -> Ret`
- `impl<Ret, A, B, C, D, E, F> PartialOrd for unsafe extern fn(A, B, C, D, E, F) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G> PartialOrd for fn(A, B, C, D, E, F, G) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G> PartialOrd for extern fn(A, B, C, D, E, F, G) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G> PartialOrd for unsafe fn(A, B, C, D, E, F, G) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G> PartialOrd for unsafe extern fn(A, B, C, D, E, F, G) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H> PartialOrd for fn(A, B, C, D, E, F, G, H) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H> PartialOrd for extern fn(A, B, C, D, E, F, G, H) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H> PartialOrd for unsafe fn(A, B, C, D, E, F, G, H) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H> PartialOrd for unsafe extern fn(A, B, C, D, E, F, G, H) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I> PartialOrd for fn(A, B, C, D, E, F, G, H, I) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I> PartialOrd for extern fn(A, B, C, D, E, F, G, H, I) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I> PartialOrd for unsafe fn(A, B, C, D, E, F, G, H, I) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I> PartialOrd for unsafe extern fn(A, B, C, D, E, F, G, H, I) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialOrd for fn(A, B, C, D, E, F, G, H, I, J) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialOrd for extern fn(A, B, C, D, E, F, G, H, I, J) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialOrd for unsafe fn(A, B, C, D, E, F, G, H, I, J) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialOrd for unsafe extern fn(A, B, C, D, E, F, G, H, I, J) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialOrd for fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialOrd for extern fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialOrd for unsafe fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialOrd for unsafe extern fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialOrd for fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialOrd for extern fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialOrd for unsafe fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret`
- `impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialOrd for unsafe extern fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret`
- `impl<T> PartialOrd for *const T where T: ?Sized`
- `impl<T> PartialOrd for *mut T where T: ?Sized`
- `impl<'a, B> PartialOrd for Cow<'a, B> where B: PartialOrd<B> + ToOwned + ?Sized`
- `impl<T> PartialOrd for Option<T> where T: PartialOrd<T>`
- `impl<T> PartialOrd for Wrapping<T> where T: PartialOrd<T>`
- `impl<T> PartialOrd for NonZero<T> where T: Zeroable + PartialOrd<T>`
- `impl<T> PartialOrd for [T; 0] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 1] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 2] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 3] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 4] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 5] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 6] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 7] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 8] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 9] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 10] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 11] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 12] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 13] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 14] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 15] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 16] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 17] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 18] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 19] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 20] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 21] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 22] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 23] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 24] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 25] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 26] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 27] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 28] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 29] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 30] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 31] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T; 32] where T: PartialOrd<T>`
- `impl<T> PartialOrd for [T] where T: PartialOrd<T>`
- `impl PartialOrd for str`
- `impl PartialOrd for Error`
- `impl<A> PartialOrd for (A,) where A: PartialEq<A> + PartialOrd<A>`
- `impl<A, B> PartialOrd for (A, B) where B: PartialEq<B> + PartialOrd<B>, A: PartialEq<A> + PartialOrd<A>`
- `impl<A, B, C> PartialOrd for (A, B, C) where A: PartialEq<A> + PartialOrd<A>, C: PartialEq<C> + PartialOrd<C>, B: PartialEq<B> + PartialOrd<B>`
- `impl<A, B, C, D> PartialOrd for (A, B, C, D) where C: PartialEq<C> + PartialOrd<C>, D: PartialEq<D> + PartialOrd<D>, A: PartialEq<A> + PartialOrd<A>, B: PartialEq<B> + PartialOrd<B>`
- `impl<A, B, C, D, E> PartialOrd for (A, B, C, D, E) where A: PartialEq<A> + PartialOrd<A>, E: PartialEq<E> + PartialOrd<E>, B: PartialEq<B> + PartialOrd<B>, D: PartialEq<D> + PartialOrd<D>, C: PartialEq<C> + PartialOrd<C>`
- `impl<A, B, C, D, E, F> PartialOrd for (A, B, C, D, E, F) where A: PartialEq<A> + PartialOrd<A>, F: PartialEq<F> + PartialOrd<F>, E: PartialEq<E> + PartialOrd<E>, D: PartialEq<D> + PartialOrd<D>, C: PartialEq<C> + PartialOrd<C>, B: PartialEq<B> + PartialOrd<B>`
- `impl<A, B, C, D, E, F, G> PartialOrd for (A, B, C, D, E, F, G) where E: PartialEq<E> + PartialOrd<E>, G: PartialEq<G> + PartialOrd<G>, C: PartialEq<C> + PartialOrd<C>, A: PartialEq<A> + PartialOrd<A>, D: PartialEq<D> + PartialOrd<D>, F: PartialEq<F> + PartialOrd<F>, B: PartialEq<B> + PartialOrd<B>`
- `impl<A, B, C, D, E, F, G, H> PartialOrd for (A, B, C, D, E, F, G, H) where H: PartialEq<H> + PartialOrd<H>, G: PartialEq<G> + PartialOrd<G>, B: PartialEq<B> + PartialOrd<B>, A: PartialEq<A> + PartialOrd<A>, F: PartialEq<F> + PartialOrd<F>, D: PartialEq<D> + PartialOrd<D>, C: PartialEq<C> + PartialOrd<C>, E: PartialEq<E> + PartialOrd<E>`
- `impl<A, B, C, D, E, F, G, H, I> PartialOrd for (A, B, C, D, E, F, G, H, I) where B: PartialEq<B> + PartialOrd<B>, H: PartialEq<H> + PartialOrd<H>, G: PartialEq<G> + PartialOrd<G>, I: PartialEq<I> + PartialOrd<I>, D: PartialEq<D> + PartialOrd<D>, E: PartialEq<E> + PartialOrd<E>, C: PartialEq<C> + PartialOrd<C>, A: PartialEq<A> + PartialOrd<A>, F: PartialEq<F> + PartialOrd<F>`
- `impl<A, B, C, D, E, F, G, H, I, J> PartialOrd for (A, B, C, D, E, F, G, H, I, J) where J: PartialEq<J> + PartialOrd<J>, A: PartialEq<A> + PartialOrd<A>, D: PartialEq<D> + PartialOrd<D>, B: PartialEq<B> + PartialOrd<B>, G: PartialEq<G> + PartialOrd<G>, I: PartialEq<I> + PartialOrd<I>, E: PartialEq<E> + PartialOrd<E>, F: PartialEq<F> + PartialOrd<F>, H: PartialEq<H> + PartialOrd<H>, C: PartialEq<C> + PartialOrd<C>`
- `impl<A, B, C, D, E, F, G, H, I, J, K> PartialOrd for (A, B, C, D, E, F, G, H, I, J, K) where F: PartialEq<F> + PartialOrd<F>, D: PartialEq<D> + PartialOrd<D>, I: PartialEq<I> + PartialOrd<I>, B: PartialEq<B> + PartialOrd<B>, G: PartialEq<G> + PartialOrd<G>, C: PartialEq<C> + PartialOrd<C>, H: PartialEq<H> + PartialOrd<H>, E: PartialEq<E> + PartialOrd<E>, K: PartialEq<K> + PartialOrd<K>, A: PartialEq<A> + PartialOrd<A>, J: PartialEq<J> + PartialOrd<J>`
- `impl<A, B, C, D, E, F, G, H, I, J, K, L> PartialOrd for (A, B, C, D, E, F, G, H, I, J, K, L) where K: PartialEq<K> + PartialOrd<K>, D: PartialEq<D> + PartialOrd<D>, E: PartialEq<E> + PartialOrd<E>, B: PartialEq<B> + PartialOrd<B>, I: PartialEq<I> + PartialOrd<I>, F: PartialEq<F> + PartialOrd<F>, G: PartialEq<G> + PartialOrd<G>, A: PartialEq<A> + PartialOrd<A>, C: PartialEq<C> + PartialOrd<C>, J: PartialEq<J> + PartialOrd<J>, H: PartialEq<H> + PartialOrd<H>, L: PartialEq<L> + PartialOrd<L>`
- `impl<K, V> PartialOrd for BTreeMap<K, V> where K: PartialOrd<K>, V: PartialOrd<V>`
- `impl<T> PartialOrd for BTreeSet<T> where T: PartialOrd<T>`
- `impl<E> PartialOrd for EnumSet<E> where E: PartialOrd<E>`
- `impl<T> PartialOrd for Arc<T> where T: PartialOrd<T> + ?Sized`

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