# [−][src]Struct rocket::fairing::Kind

A bitset representing the kinds of callbacks a
`Fairing`

wishes to receive.

A fairing can request any combination of any of the following kinds of callbacks:

- Attach
- Launch
- Request
- Response

Two `Kind`

structures can be `or`

d together to represent a combination. For
instance, to represent a fairing that is both a launch and request fairing,
use `Kind::Launch | Kind::Request`

. Similarly, to represent a fairing that
is only an attach fairing, use `Kind::Attach`

.

## Methods

`impl Kind`

[src]

`impl Kind`

`pub const `**Attach**: Kind

[src]

**Attach**: Kind

`Kind`

flag representing a request for an 'attach' callback.

`pub const `**Launch**: Kind

[src]

**Launch**: Kind

`Kind`

flag representing a request for a 'launch' callback.

`pub const `**Request**: Kind

[src]

**Request**: Kind

`Kind`

flag representing a request for a 'request' callback.

`pub const `**Response**: Kind

[src]

**Response**: Kind

`Kind`

flag representing a request for a 'response' callback.

`pub fn is(self, other: Kind) -> bool`

[src]

`pub fn is(self, other: Kind) -> bool`

Returns `true`

if `self`

is a superset of `other`

. In other words,
returns `true`

if all of the kinds in `other`

are also in `self`

.

# Example

use rocket::fairing::Kind; let launch_and_req = Kind::Launch | Kind::Request; assert!(launch_and_req.is(Kind::Launch | Kind::Request)); assert!(launch_and_req.is(Kind::Launch)); assert!(launch_and_req.is(Kind::Request)); assert!(!launch_and_req.is(Kind::Response)); assert!(!launch_and_req.is(Kind::Launch | Kind::Response)); assert!(!launch_and_req.is(Kind::Launch | Kind::Request | Kind::Response));

`pub fn is_exactly(self, other: Kind) -> bool`

[src]

`pub fn is_exactly(self, other: Kind) -> bool`

Returns `true`

if `self`

is exactly `other`

.

# Example

use rocket::fairing::Kind; let launch_and_req = Kind::Launch | Kind::Request; assert!(launch_and_req.is_exactly(Kind::Launch | Kind::Request)); assert!(!launch_and_req.is_exactly(Kind::Launch)); assert!(!launch_and_req.is_exactly(Kind::Request)); assert!(!launch_and_req.is_exactly(Kind::Response)); assert!(!launch_and_req.is_exactly(Kind::Launch | Kind::Response));

## Trait Implementations

`impl Copy for Kind`

[src]

`impl Copy for Kind`

`impl Clone for Kind`

[src]

`impl Clone for Kind`

`fn clone(&self) -> Kind`

[src]

`fn clone(&self) -> Kind`

`fn clone_from(&mut self, source: &Self)`

1.0.0[src]

`fn clone_from(&mut self, source: &Self)`

Performs copy-assignment from `source`

. Read more

`impl BitOr<Kind> for Kind`

[src]

`impl BitOr<Kind> for Kind`

`type Output = Self`

The resulting type after applying the `|`

operator.

`fn bitor(self, rhs: Self) -> Self`

[src]

`fn bitor(self, rhs: Self) -> Self`

`impl Debug for Kind`

[src]

`impl Debug for Kind`

## Auto Trait Implementations

## Blanket Implementations

`impl<T> From for T`

[src]

`impl<T> From for T`

`impl<T, U> Into for T where`

U: From<T>,

[src]

`impl<T, U> Into for T where`

U: From<T>,

`impl<T> ToOwned for T where`

T: Clone,

[src]

`impl<T> ToOwned for T where`

T: Clone,

`impl<T, U> TryFrom for T where`

T: From<U>,

[src]

`impl<T, U> TryFrom for T where`

T: From<U>,

`type Error = !`

`try_from`

)The type returned in the event of a conversion error.

`fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>`

[src]

`fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>`

`impl<T> Borrow for T where`

T: ?Sized,

[src]

`impl<T> Borrow for T where`

T: ?Sized,

`impl<T> Any for T where`

T: 'static + ?Sized,

[src]

`impl<T> Any for T where`

T: 'static + ?Sized,

`fn get_type_id(&self) -> TypeId`

[src]

`fn get_type_id(&self) -> TypeId`

`impl<T, U> TryInto for T where`

U: TryFrom<T>,

[src]

`impl<T, U> TryInto for T where`

U: TryFrom<T>,

`type Error = <U as TryFrom<T>>::Error`

`try_from`

)The type returned in the event of a conversion error.

`fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`

[src]

`fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`

`impl<T> BorrowMut for T where`

T: ?Sized,

[src]

`impl<T> BorrowMut for T where`

T: ?Sized,

`fn borrow_mut(&mut self) -> &mut T`

[src]

`fn borrow_mut(&mut self) -> &mut T`

`impl<T> Typeable for T where`

T: Any,

`impl<T> Typeable for T where`

T: Any,

`impl<T> IntoCollection for T`

`impl<T> IntoCollection for T`

#### ⓘImportant traits for SmallVec<A>`fn into_collection<A>(self) -> SmallVec<A> where`

A: Array<Item = T>,

`fn into_collection<A>(self) -> SmallVec<A> where`

A: Array<Item = T>,

#### ⓘImportant traits for SmallVec<A>`fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where`

A: Array<Item = U>,

F: FnMut(T) -> U,

`fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where`

A: Array<Item = U>,

F: FnMut(T) -> U,

`impl<T, I> AsResult for T where`

I: Input,

`impl<T, I> AsResult for T where`

I: Input,