[−][src]Struct dasn1_core::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: Enumerable> Enumerated<E>
[src]
pub fn new(enumerable: E) -> Self
[src]
Instantiate a new instance of Enumerated
with an Enumerable
variant.
pub fn into_inner(self) -> E
[src]
Consumes self and returns the inner Enumerable
variant from an instance of Enumerated
.
Trait Implementations
impl<E: Clone + Enumerable> Clone for Enumerated<E>
[src]
fn clone(&self) -> Enumerated<E>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<E: Enumerable> AsRef<E> for Enumerated<E>
[src]
impl<E: PartialEq + Enumerable> PartialEq<Enumerated<E>> for Enumerated<E>
[src]
fn eq(&self, other: &Enumerated<E>) -> bool
[src]
fn ne(&self, other: &Enumerated<E>) -> bool
[src]
impl<E: Enumerable> AsMut<E> for Enumerated<E>
[src]
impl<E: Copy + Enumerable> Copy for Enumerated<E>
[src]
impl<E: Eq + Enumerable> Eq for Enumerated<E>
[src]
impl<E: Debug + Enumerable> Debug for Enumerated<E>
[src]
impl<E: Enumerable + Serialize> Serialize for Enumerated<E>
[src]
impl<'de, E: Enumerable + Deserialize<'de>> Deserialize<'de> for Enumerated<E>
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
impl<E> Sync for Enumerated<E> where
E: Sync,
E: Sync,
impl<E> Send for Enumerated<E> where
E: Send,
E: Send,
impl<E> Unpin for Enumerated<E> where
E: Unpin,
E: Unpin,
impl<E> RefUnwindSafe for Enumerated<E> where
E: RefUnwindSafe,
E: RefUnwindSafe,
impl<E> UnwindSafe for Enumerated<E> where
E: UnwindSafe,
E: UnwindSafe,
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
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
[src]
type Output = T
Should always be Self