pub enum ValueType {
Scalar(ScalarType),
Duration,
String,
Bytes,
}Expand description
Enumeration of value types
Variants§
Scalar(ScalarType)
Scalar type
Duration
Time duration, e.g. a timeout
String
Text data
Bytes
Binary data
Implementations§
Source§impl ValueType
impl ValueType
pub const fn to_scalar(self) -> Option<ScalarType>
pub const fn is_scalar(self) -> bool
pub const fn from_scalar(scalar: ScalarType) -> Self
pub fn try_from_str(s: &str) -> Option<Self>
Trait Implementations§
Source§impl From<Type> for ValueType
impl From<Type> for ValueType
Source§fn from(from: ScalarType) -> Self
fn from(from: ScalarType) -> Self
Converts to this type from the input type.
impl Copy for ValueType
impl Eq for ValueType
impl StructuralPartialEq for ValueType
Auto Trait Implementations§
impl Freeze for ValueType
impl RefUnwindSafe for ValueType
impl Send for ValueType
impl Sync for ValueType
impl Unpin for ValueType
impl UnwindSafe for ValueType
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