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
.
Kind
flag representing a request for an 'attach' callback.
Kind
flag representing a request for a 'launch' callback.
Kind
flag representing a request for a 'request' callback.
Kind
flag representing a request for a 'response' callback.
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
.
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));
Returns true
if self
is exactly other
.
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));
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the |
operator.
Performs the |
operation.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
Get the TypeId
of this object.