Enum mlmd::metadata::PropertyValue
source · [−]Expand description
Property value.
Variants
Int(i32)
Double(f64)
String(String)
Implementations
sourceimpl PropertyValue
impl PropertyValue
sourcepub fn ty(&self) -> PropertyType
pub fn ty(&self) -> PropertyType
Gets the type of this property.
sourcepub fn as_int(&self) -> Option<i32>
pub fn as_int(&self) -> Option<i32>
Gets the value of this property as i32
.
If this is not a PropertyValue::Int
, None
is returned .
Trait Implementations
sourceimpl Clone for PropertyValue
impl Clone for PropertyValue
sourcefn clone(&self) -> PropertyValue
fn clone(&self) -> PropertyValue
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 PropertyValue
impl Debug for PropertyValue
sourceimpl<'a> From<&'a str> for PropertyValue
impl<'a> From<&'a str> for PropertyValue
sourceimpl From<String> for PropertyValue
impl From<String> for PropertyValue
sourceimpl From<f64> for PropertyValue
impl From<f64> for PropertyValue
sourceimpl From<i32> for PropertyValue
impl From<i32> for PropertyValue
sourceimpl PartialEq<PropertyValue> for PropertyValue
impl PartialEq<PropertyValue> for PropertyValue
sourcefn eq(&self, other: &PropertyValue) -> bool
fn eq(&self, other: &PropertyValue) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PropertyValue) -> bool
fn ne(&self, other: &PropertyValue) -> bool
This method tests for !=
.
impl StructuralPartialEq for PropertyValue
Auto Trait Implementations
impl RefUnwindSafe for PropertyValue
impl Send for PropertyValue
impl Sync for PropertyValue
impl Unpin for PropertyValue
impl UnwindSafe for PropertyValue
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