pub enum EmberValue {
Integer(i64),
Real(f64),
String(String),
Boolean(bool),
Octets(Vec<u8>),
Null,
}Expand description
A value that can be held by a parameter.
Variants§
Integer(i64)
Integer value
Real(f64)
Real (floating point) value
String(String)
String value
Boolean(bool)
Boolean value
Octets(Vec<u8>)
Octet string (binary data)
Null
Null/empty value
Implementations§
Source§impl EmberValue
impl EmberValue
Sourcepub fn as_integer(&self) -> Option<i64>
pub fn as_integer(&self) -> Option<i64>
Get as integer if possible.
Sourcepub fn as_boolean(&self) -> Option<bool>
pub fn as_boolean(&self) -> Option<bool>
Get as boolean if possible.
Sourcepub fn parameter_type(&self) -> ParameterType
pub fn parameter_type(&self) -> ParameterType
Get the parameter type for this value.
Trait Implementations§
Source§impl Clone for EmberValue
impl Clone for EmberValue
Source§fn clone(&self) -> EmberValue
fn clone(&self) -> EmberValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmberValue
impl Debug for EmberValue
Source§impl Default for EmberValue
impl Default for EmberValue
Source§impl Display for EmberValue
impl Display for EmberValue
Source§impl From<&str> for EmberValue
impl From<&str> for EmberValue
Source§impl From<String> for EmberValue
impl From<String> for EmberValue
Source§impl From<bool> for EmberValue
impl From<bool> for EmberValue
Source§impl From<f64> for EmberValue
impl From<f64> for EmberValue
Source§impl From<i32> for EmberValue
impl From<i32> for EmberValue
Source§impl From<i64> for EmberValue
impl From<i64> for EmberValue
Source§impl PartialEq for EmberValue
impl PartialEq for EmberValue
impl StructuralPartialEq for EmberValue
Auto Trait Implementations§
impl Freeze for EmberValue
impl RefUnwindSafe for EmberValue
impl Send for EmberValue
impl Sync for EmberValue
impl Unpin for EmberValue
impl UnsafeUnpin for EmberValue
impl UnwindSafe for EmberValue
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