pub struct Enumerator {
pub name: Option<String>,
pub value: Option<i128>,
}Expand description
An enumerator of an enumerated data type, given by name, by number or by both.
Decoding fills in the number and, when the number is an enumerator of the data type, the name. Encoding looks the name up when there is one (a number given with it must be one of the values of that enumerator) and otherwise requires the number to be the value of an enumerator.
Fields§
§name: Option<String>Name of the enumerator; None for a number that is no enumerator of the data type.
value: Option<i128>Numeric value; None stands for the (first) value the FOM gives the name.
Implementations§
Source§impl Enumerator
impl Enumerator
Trait Implementations§
Source§impl Clone for Enumerator
impl Clone for Enumerator
Source§impl Debug for Enumerator
impl Debug for Enumerator
Source§impl<'de> Deserialize<'de> for Enumerator
impl<'de> Deserialize<'de> for Enumerator
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Enumerator
Name(1), Name without a number, ?(7) without a name.
impl Display for Enumerator
Name(1), Name without a number, ?(7) without a name.
impl Eq for Enumerator
Source§impl From<&str> for Enumerator
impl From<&str> for Enumerator
Source§impl From<Enumerator> for Value
impl From<Enumerator> for Value
Source§fn from(enumerator: Enumerator) -> Self
fn from(enumerator: Enumerator) -> Self
Converts to this type from the input type.
Source§impl From<String> for Enumerator
impl From<String> for Enumerator
Source§impl Hash for Enumerator
impl Hash for Enumerator
Source§impl PartialEq for Enumerator
impl PartialEq for Enumerator
Source§impl Serialize for Enumerator
impl Serialize for Enumerator
impl StructuralPartialEq for Enumerator
Auto Trait Implementations§
impl Forget for Enumerator
impl Freeze for Enumerator
impl Move for Enumerator
impl RefUnwindSafe for Enumerator
impl Send for Enumeratorwhere
RawVecInner: Send,
impl Sync for Enumeratorwhere
RawVecInner: Sync,
impl Unpin for Enumerator
impl UnsafeUnpin for Enumerator
impl UnwindSafe for Enumeratorwhere
RawVecInner: UnwindSafe,
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