[−]Struct dasn1::types::enumerated::Enumerated
A representation of the ENUMERATED
ASN.1 data type. Enumerated
should be
a wrapper around an enum
with no inner data. Using Enumerated
will
produce the ENUMERATED
encoding where as using enum
s directly will
produce the CHOICE
encoding.
Methods
impl<E> Enumerated<E> where
E: Enumerable,
E: Enumerable,
pub fn new(enumerable: E) -> Enumerated<E>
Instantiate a new instance of Enumerated
with an Enumerable
variant.
pub fn into_inner(self) -> E
Consumes self and returns the inner Enumerable
variant from an instance of Enumerated
.
Trait Implementations
impl<E> PartialEq<Enumerated<E>> for Enumerated<E> where
E: Enumerable + PartialEq<E>,
E: Enumerable + PartialEq<E>,
fn eq(&self, other: &Enumerated<E>) -> bool
fn ne(&self, other: &Enumerated<E>) -> bool
impl<E> AsMut<E> for Enumerated<E> where
E: Enumerable,
E: Enumerable,
impl<E> Debug for Enumerated<E> where
E: Enumerable + Debug,
E: Enumerable + Debug,
impl<E> AsRef<E> for Enumerated<E> where
E: Enumerable,
E: Enumerable,
impl<E> Copy for Enumerated<E> where
E: Enumerable + Copy,
E: Enumerable + Copy,
impl<E> Serialize for Enumerated<E> where
E: Enumerable + Serialize,
E: Enumerable + Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl<'de, E> Deserialize<'de> for Enumerated<E> where
E: Enumerable + Deserialize<'de>,
E: Enumerable + Deserialize<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Enumerated<E>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
deserializer: D
) -> Result<Enumerated<E>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl<E> Clone for Enumerated<E> where
E: Enumerable + Clone,
E: Enumerable + Clone,
fn clone(&self) -> Enumerated<E>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<E> Eq for Enumerated<E> where
E: Enumerable + Eq,
E: Enumerable + Eq,
Auto Trait Implementations
impl<E> Sync for Enumerated<E> where
E: Sync,
E: Sync,
impl<E> Unpin for Enumerated<E> where
E: Unpin,
E: Unpin,
impl<E> Send for Enumerated<E> where
E: Send,
E: Send,
impl<E> UnwindSafe for Enumerated<E> where
E: UnwindSafe,
E: UnwindSafe,
impl<E> RefUnwindSafe for Enumerated<E> where
E: RefUnwindSafe,
E: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,