pub enum PrimitiveData {
Null,
Bool(bool),
Unsigned(u64),
Signed(i64),
Float(f64),
String(String),
Bytes(Vec<u8>),
Enum(&'static str),
Any(Any),
}Expand description
Enumeration for representing any type of primitive data that can be stored in YAML or protobuf.
Variants
Null
Used for nulls (YAML only).
Bool(bool)
Used for booleans.
Unsigned(u64)
Used for unsigned integers.
Signed(i64)
Used for signed integers.
Float(f64)
Used for floating-point values.
String(String)
Used for UTF-8 strings.
Bytes(Vec<u8>)
Used for bytestrings.
Enum(&'static str)
Used for enumerations (protobuf only).
Any(Any)
Used for Any messages (protobuf only).
Trait Implementations
sourceimpl Clone for PrimitiveData
impl Clone for PrimitiveData
sourcefn clone(&self) -> PrimitiveData
fn clone(&self) -> PrimitiveData
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 PrimitiveData
impl Debug for PrimitiveData
sourceimpl Display for PrimitiveData
impl Display for PrimitiveData
sourceimpl From<&'_ PrimitiveData> for PrimitiveData
impl From<&'_ PrimitiveData> for PrimitiveData
sourcefn from(node: &PrimitiveData) -> Self
fn from(node: &PrimitiveData) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<PrimitiveData> for PrimitiveData
impl PartialEq<PrimitiveData> for PrimitiveData
sourcefn eq(&self, other: &PrimitiveData) -> bool
fn eq(&self, other: &PrimitiveData) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &PrimitiveData) -> bool
fn ne(&self, other: &PrimitiveData) -> bool
This method tests for !=.
impl StructuralPartialEq for PrimitiveData
Auto Trait Implementations
impl RefUnwindSafe for PrimitiveData
impl Send for PrimitiveData
impl Sync for PrimitiveData
impl Unpin for PrimitiveData
impl UnwindSafe for PrimitiveData
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more