pub enum Feature {
Sender(SenderFeature),
Issuer(IssuerFeature),
Metadata(MetadataFeature),
Tag(TagFeature),
}block only.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.
PANIC: do not call on a non-sender feature.
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.
PANIC: do not call on a non-issuer feature.
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.
PANIC: do not call on a non-metadata feature.
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.
PANIC: do not call on a non-tag feature.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Feature
impl<'de> Deserialize<'de> for Feature
Source§fn 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>,
Source§impl From<&Feature> for FeatureDto
Available on crate feature dto only.
impl From<&Feature> for FeatureDto
dto only.Source§impl From<IssuerFeature> for Feature
impl From<IssuerFeature> for Feature
Source§fn from(original: IssuerFeature) -> Feature
fn from(original: IssuerFeature) -> Feature
Source§impl From<MetadataFeature> for Feature
impl From<MetadataFeature> for Feature
Source§fn from(original: MetadataFeature) -> Feature
fn from(original: MetadataFeature) -> Feature
Source§impl From<SenderFeature> for Feature
impl From<SenderFeature> for Feature
Source§fn from(original: SenderFeature) -> Feature
fn from(original: SenderFeature) -> Feature
Source§impl From<TagFeature> for Feature
impl From<TagFeature> for Feature
Source§fn from(original: TagFeature) -> Feature
fn from(original: TagFeature) -> Feature
Source§impl Ord for Feature
impl Ord for Feature
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
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§fn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
fn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
Packer.Source§fn unpack<U: Unpacker, const VERIFY: bool>(
unpacker: &mut U,
visitor: &Self::UnpackVisitor,
) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
fn unpack<U: Unpacker, const VERIFY: bool>( unpacker: &mut U, visitor: &Self::UnpackVisitor, ) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
Unpacker. The VERIFY generic parameter can be used to skip additional
syntactic checks.Source§impl PartialOrd for Feature
impl PartialOrd for Feature
Source§impl TryFrom<&FeatureDto> for Feature
Available on crate feature dto only.
impl TryFrom<&FeatureDto> for Feature
dto only.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 UnsafeUnpin 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> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<P> PackableExt for Pwhere
P: Packable,
impl<P> PackableExt for Pwhere
P: Packable,
Source§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]>].
Source§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.
Source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
pack.