pub enum Configuration {
Unsigned(u64),
Signed(i64),
String(String),
}Expand description
A configured value for a resource.
Variants§
Unsigned(u64)
An unsigned integer configuration value.
Signed(i64)
A signed integer configuration value.
String(String)
A string configuration value.
Implementations§
Source§impl Configuration
impl Configuration
Sourcepub fn to_signed(&self) -> Option<i64>
pub fn to_signed(&self) -> Option<i64>
Evaluates the contents of this configuration as a signed integer. Returns None if unable to convert safely.
Sourcepub fn to_unsigned(&self) -> Option<u64>
pub fn to_unsigned(&self) -> Option<u64>
Evaluates the contents of this configuration as an unsigned integer. Returns None if unable to convert safely.
Trait Implementations§
Source§impl Clone for Configuration
impl Clone for Configuration
Source§fn clone(&self) -> Configuration
fn clone(&self) -> Configuration
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 Configuration
impl Debug for Configuration
Source§impl<'de> Deserialize<'de> for Configuration
impl<'de> Deserialize<'de> for Configuration
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 Configuration
impl Display for Configuration
Source§impl<'a> From<&'a str> for Configuration
impl<'a> From<&'a str> for Configuration
Source§impl From<String> for Configuration
impl From<String> for Configuration
Source§impl From<i64> for Configuration
impl From<i64> for Configuration
Source§impl From<u64> for Configuration
impl From<u64> for Configuration
Auto Trait Implementations§
impl Freeze for Configuration
impl RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl UnwindSafe for Configuration
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