pub struct Feature {
pub kind: FeatureKind,
pub location: Location,
pub qualifiers: Vec<(QualifierKey, Option<String>)>,
}
Expand description
An annotation, or “feature”. Note that one qualifier key can occur multiple
times with distinct values. We store them in a Vec
to preserve order. Some
qualifiers have no value.
Fields
kind: FeatureKind
location: Location
qualifiers: Vec<(QualifierKey, Option<String>)>
Implementations
sourceimpl Feature
impl Feature
sourcepub fn qualifier_values(&self, key: QualifierKey) -> impl Iterator<Item = &str>
pub fn qualifier_values(&self, key: QualifierKey) -> impl Iterator<Item = &str>
Returns all the values for a given QualifierKey. Qualifiers with no
value (ie. /foo
) are ignored
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Feature
impl<'de> Deserialize<'de> for Feature
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Feature
Auto Trait Implementations
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnwindSafe for Feature
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more