pub struct Measure {
pub unit: Option<String>,
pub numerical_value: Option<String>,
}Expand description
A quantity with a unit of measure.
The type http://www.ontology-of-units-of-measure.org/resource/om-2/Measure.
Fields§
§unit: Option<String>The name of the unit, according to the Ontology of units of Measure
classification. The recommended unit for countable items is "one".
numerical_value: Option<String>The amount of the resource. If not specified, arbitrary amounts can be used when responding to the proposal.
Implementations§
Source§impl Measure
impl Measure
Sourcepub const TYPE_IRI: &'static str = "http://www.ontology-of-units-of-measure.org/resource/om-2/Measure"
pub const TYPE_IRI: &'static str = "http://www.ontology-of-units-of-measure.org/resource/om-2/Measure"
The type’s IRI.
Sourcepub fn from_json_untyped(value: &Value) -> Result<Self, JsonError>
pub fn from_json_untyped(value: &Value) -> Result<Self, JsonError>
Read a Measure sent without its type, as some properties send it.
§Errors
When value is not an object.
Sourcepub fn to_json_untyped(&self) -> Value
pub fn to_json_untyped(&self) -> Value
Write a Measure without its type, as some properties send it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Measure
impl<'de> Deserialize<'de> for Measure
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Measure
Auto Trait Implementations§
impl Freeze for Measure
impl RefUnwindSafe for Measure
impl Send for Measure
impl Sync for Measure
impl Unpin for Measure
impl UnsafeUnpin for Measure
impl UnwindSafe for Measure
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