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
sourceimpl 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
sourceimpl From<Type> for ValueType
impl From<Type> for ValueType
sourcefn 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 StructuralEq for ValueType
impl StructuralPartialEq for ValueType
Auto Trait Implementations
impl RefUnwindSafe for ValueType
impl Send for ValueType
impl Sync for ValueType
impl Unpin for ValueType
impl UnwindSafe for ValueType
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