pub enum Capability {
Types,
Dataflow,
}Expand description
A host analysis a rule can declare it needs.
Closed, and small on purpose. A capability exists here only once something implements it or refuses it by name — the alternative is a rule declaring a dependency on an analysis nothing will ever provide, which reads as configuration rather than as the error it is.
Variants§
Types
Type answers about a node — ctx.types.
Dataflow
Dataflow answers about a value’s movement. Declared, not yet implemented.
Implementations§
Source§impl Capability
impl Capability
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The name a rule writes, which is the name the refusal prints.
Sourcepub const fn all() -> &'static [Self]
pub const fn all() -> &'static [Self]
Every capability, in the order as_str and parse agree on.
For a refusal that lists what a rule may name — mirrors Namespace::built_ins for
the same reason: one place naming every variant, so a message enumerating them cannot
name a different set than parse recognizes.
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Capability
Source§impl Debug for Capability
impl Debug for Capability
impl Eq for Capability
Source§impl Hash for Capability
impl Hash for Capability
Source§impl Ord for Capability
impl Ord for Capability
Source§fn cmp(&self, other: &Capability) -> Ordering
fn cmp(&self, other: &Capability) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Capability
impl PartialEq for Capability
Source§impl PartialOrd for Capability
impl PartialOrd for Capability
impl StructuralPartialEq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more