pub enum Feature {
Sender(SenderFeature),
Issuer(IssuerFeature),
Metadata(MetadataFeature),
Tag(TagFeature),
}Expand description
Variants§
Sender(SenderFeature)
A sender feature.
Issuer(IssuerFeature)
An issuer feature.
Metadata(MetadataFeature)
A metadata feature.
Tag(TagFeature)
A tag feature.
Implementations§
Source§impl Feature
impl Feature
Sourcepub fn flag(&self) -> FeatureFlags
pub fn flag(&self) -> FeatureFlags
Returns the FeatureFlags for the given Feature.
Sourcepub fn is_sender(&self) -> bool
pub fn is_sender(&self) -> bool
Checks whether the feature is a SenderFeature.
Sourcepub fn as_sender(&self) -> &SenderFeature
pub fn as_sender(&self) -> &SenderFeature
Gets the feature as an actual SenderFeature.
NOTE: Will panic if the feature is not a SenderFeature.
Sourcepub fn is_issuer(&self) -> bool
pub fn is_issuer(&self) -> bool
Checks whether the feature is an IssuerFeature.
Sourcepub fn as_issuer(&self) -> &IssuerFeature
pub fn as_issuer(&self) -> &IssuerFeature
Gets the feature as an actual IssuerFeature.
NOTE: Will panic if the feature is not an IssuerFeature.
Sourcepub fn is_metadata(&self) -> bool
pub fn is_metadata(&self) -> bool
Checks whether the feature is a MetadataFeature.
Sourcepub fn as_metadata(&self) -> &MetadataFeature
pub fn as_metadata(&self) -> &MetadataFeature
Gets the feature as an actual MetadataFeature.
NOTE: Will panic if the feature is not a MetadataFeature.
Sourcepub fn is_tag(&self) -> bool
pub fn is_tag(&self) -> bool
Checks whether the feature is a TagFeature.
Sourcepub fn as_tag(&self) -> &TagFeature
pub fn as_tag(&self) -> &TagFeature
Gets the feature as an actual TagFeature.
NOTE: Will panic if the feature is not a TagFeature.
Trait Implementations§
Source§impl From<IssuerFeature> for Feature
impl From<IssuerFeature> for Feature
Source§fn from(value: IssuerFeature) -> Self
fn from(value: IssuerFeature) -> Self
Source§impl From<MetadataFeature> for Feature
impl From<MetadataFeature> for Feature
Source§fn from(value: MetadataFeature) -> Self
fn from(value: MetadataFeature) -> Self
Source§impl From<SenderFeature> for Feature
impl From<SenderFeature> for Feature
Source§fn from(value: SenderFeature) -> Self
fn from(value: SenderFeature) -> Self
Source§impl From<TagFeature> for Feature
impl From<TagFeature> for Feature
Source§fn from(value: TagFeature) -> Self
fn from(value: TagFeature) -> Self
Source§impl Ord for Feature
impl Ord for Feature
Source§impl Packable for Feature
impl Packable for Feature
Source§type UnpackError = Error
type UnpackError = Error
Source§type UnpackVisitor = <SenderFeature as Packable>::UnpackVisitor
type UnpackVisitor = <SenderFeature as Packable>::UnpackVisitor
Source§impl PartialOrd for Feature
impl PartialOrd for Feature
impl Eq for Feature
impl StructuralPartialEq for Feature
Auto Trait Implementations§
impl Freeze for Feature
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnwindSafe for Feature
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<P> PackableExt for Pwhere
P: Packable,
impl<P> PackableExt for Pwhere
P: Packable,
§fn unpack_verified<T>(
bytes: T,
visitor: &<P as Packable>::UnpackVisitor,
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_verified<T>( bytes: T, visitor: &<P as Packable>::UnpackVisitor, ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>].
§fn unpack_unverified<T>(
bytes: T,
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_unverified<T>( bytes: T, ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>] skipping some syntatical checks.
§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
pack.