pub enum Ability_ {
Copy,
Drop,
Store,
Key,
}
Variants§
Implementations§
source§impl Ability_
impl Ability_
pub const COPY: &'static str = "copy"
pub const DROP: &'static str = "drop"
pub const STORE: &'static str = "store"
pub const KEY: &'static str = "key"
sourcepub fn requires(self) -> Ability_
pub fn requires(self) -> Ability_
For a struct with ability a
, each field needs to have the ability a.requires()
.
Consider a generic type Foo<t1, …, tn>, for Foo<t1, …, tn> to have ability a
, Foo must
have been declared with a
and each type argument ti must have the ability a.requires()
sourcepub fn required_by(self) -> Vec<Ability_> ⓘ
pub fn required_by(self) -> Vec<Ability_> ⓘ
An inverse of requires
, where x is in a.required_by() iff x.requires() == a
Trait Implementations§
source§impl Ord for Ability_
impl Ord for Ability_
source§impl PartialEq<Ability_> for Ability_
impl PartialEq<Ability_> for Ability_
source§impl PartialOrd<Ability_> for Ability_
impl PartialOrd<Ability_> for Ability_
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Ability_
impl Eq for Ability_
impl StructuralEq for Ability_
impl StructuralPartialEq for Ability_
Auto Trait Implementations§
impl RefUnwindSafe for Ability_
impl Send for Ability_
impl Sync for Ability_
impl Unpin for Ability_
impl UnwindSafe for Ability_
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.