pub struct LoweringCapabilities(/* private fields */);Expand description
Capabilities that change lowering, and therefore enter the plan identity.
Tags are namespaced (vendor.example/render) and the set is canonical:
sorted, deduplicated, and validated, so two callers that declare the same
capabilities in a different order form one identity. The set is deliberately
conservative — a capability that turns out not to change lowering costs a
duplicate entry, while omitting one that does would serve a wrong plan.
Implementations§
Source§impl LoweringCapabilities
impl LoweringCapabilities
Sourcepub fn none() -> LoweringCapabilities
pub fn none() -> LoweringCapabilities
No declaration: a plan whose lowering depends on nothing optional.
Sourcepub fn declare<I, S>(tags: I) -> Result<LoweringCapabilities, PlanInputError>
pub fn declare<I, S>(tags: I) -> Result<LoweringCapabilities, PlanInputError>
Declare lowering-relevant capabilities. Order does not matter; tags are validated and canonicalized.
pub fn contains(&self, tag: &str) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = &str>
Sourcepub fn missing_from<'a>(
&'a self,
other: &LoweringCapabilities,
) -> Option<&'a str>
pub fn missing_from<'a>( &'a self, other: &LoweringCapabilities, ) -> Option<&'a str>
The first capability this set requires that other does not declare.
Trait Implementations§
Source§impl Clone for LoweringCapabilities
impl Clone for LoweringCapabilities
Source§fn clone(&self) -> LoweringCapabilities
fn clone(&self) -> LoweringCapabilities
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 moreSource§impl Debug for LoweringCapabilities
impl Debug for LoweringCapabilities
Source§impl Default for LoweringCapabilities
impl Default for LoweringCapabilities
Source§fn default() -> LoweringCapabilities
fn default() -> LoweringCapabilities
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LoweringCapabilities
impl<'de> Deserialize<'de> for LoweringCapabilities
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LoweringCapabilities, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LoweringCapabilities, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LoweringCapabilities
Source§impl Hash for LoweringCapabilities
impl Hash for LoweringCapabilities
Source§impl Ord for LoweringCapabilities
impl Ord for LoweringCapabilities
Source§fn cmp(&self, other: &LoweringCapabilities) -> Ordering
fn cmp(&self, other: &LoweringCapabilities) -> 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 LoweringCapabilities
impl PartialEq for LoweringCapabilities
Source§impl PartialOrd for LoweringCapabilities
impl PartialOrd for LoweringCapabilities
Source§impl Serialize for LoweringCapabilities
impl Serialize for LoweringCapabilities
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LoweringCapabilities
Auto Trait Implementations§
impl Forget for LoweringCapabilities
impl Freeze for LoweringCapabilities
impl Move for LoweringCapabilities
impl RefUnwindSafe for LoweringCapabilities
impl Send for LoweringCapabilities
impl Sync for LoweringCapabilities
impl Unpin for LoweringCapabilities
impl UnsafeUnpin for LoweringCapabilities
impl UnwindSafe for LoweringCapabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.