Enum autosar_data::CharacterData
source · [−]Expand description
The enum CharacterData provides typed access to the content of elements and attributes
Example:
In the xml string <SHORT-NAME>SomeName</SHORT-NAME> the character data
“SomeName” will be loaded as CharacterData::String(“SomeName”), while the content of the
attribute <… DEST=“UNIT”> will be loaded as CharacterData::Enum(EnumItem::Unit)
Variants
Enum(EnumItem)
String(String)
UnsignedInteger(u64)
Double(f64)
Implementations
sourceimpl CharacterData
impl CharacterData
sourcepub fn enum_value(&self) -> Option<EnumItem>
pub fn enum_value(&self) -> Option<EnumItem>
Get the contained enum value
Returns the enum value if the content is an enum, or None otherwise
sourcepub fn string_value(&self) -> Option<String>
pub fn string_value(&self) -> Option<String>
Get the contained string
Returns the string if the content is a string, or None otherwise
sourcepub fn unsigned_integer_value(&self) -> Option<u64>
pub fn unsigned_integer_value(&self) -> Option<u64>
Get the contained unsigned integer
Returns the string if the content is a string, or None otherwise
sourcepub fn double_value(&self) -> Option<f64>
pub fn double_value(&self) -> Option<f64>
Get the contained double
Returns the value content is a double, or None otherwise
Trait Implementations
sourceimpl Clone for CharacterData
impl Clone for CharacterData
sourcefn clone(&self) -> CharacterData
fn clone(&self) -> CharacterData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for CharacterData
impl Debug for CharacterData
sourceimpl Display for CharacterData
impl Display for CharacterData
sourceimpl PartialEq<CharacterData> for CharacterData
impl PartialEq<CharacterData> for CharacterData
sourcefn eq(&self, other: &CharacterData) -> bool
fn eq(&self, other: &CharacterData) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
impl StructuralPartialEq for CharacterData
Auto Trait Implementations
impl RefUnwindSafe for CharacterData
impl Send for CharacterData
impl Sync for CharacterData
impl Unpin for CharacterData
impl UnwindSafe for CharacterData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more