pub struct FeatureDescriptor<'a> { /* private fields */ }
Expand description
Descriptor of a single host feature.
This struct is slightly different from the raw LV2_Feature
struct, as the length of the
contained URI is precomputed for faster comparison.
Implementations§
Source§impl<'a> FeatureDescriptor<'a>
impl<'a> FeatureDescriptor<'a>
Sourcepub fn is_feature<T: Feature>(&self) -> bool
pub fn is_feature<T: Feature>(&self) -> bool
Evaluate whether this object describes the given feature.
Sourcepub fn into_feature<T: Feature>(self, class: ThreadingClass) -> Result<T, Self>
pub fn into_feature<T: Feature>(self, class: ThreadingClass) -> Result<T, Self>
Try to return a feature struct instance from the internal data.
If this object describes the requested feature, it will be created from the raw data. This operation consumes the descriptor since it would be possible to have multiple features instances otherwise. You also have to provide the threading class of the feature.
If the feature construction fails, the descriptor will be returned again.
Auto Trait Implementations§
impl<'a> Freeze for FeatureDescriptor<'a>
impl<'a> RefUnwindSafe for FeatureDescriptor<'a>
impl<'a> !Send for FeatureDescriptor<'a>
impl<'a> !Sync for FeatureDescriptor<'a>
impl<'a> Unpin for FeatureDescriptor<'a>
impl<'a> UnwindSafe for FeatureDescriptor<'a>
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