pub struct IntegerWithUnits {
pub value: i32,
pub units: String,
}Expand description
IntegerWithUnits : A whole number dimension and its unit of measurement. For example, this can represent 100 pixels.
Fields§
§value: i32The dimension value.
units: StringThe unit of measurement.
Implementations§
Source§impl IntegerWithUnits
impl IntegerWithUnits
Sourcepub fn new(value: i32, units: String) -> IntegerWithUnits
pub fn new(value: i32, units: String) -> IntegerWithUnits
A whole number dimension and its unit of measurement. For example, this can represent 100 pixels.
Trait Implementations§
Source§impl Clone for IntegerWithUnits
impl Clone for IntegerWithUnits
Source§fn clone(&self) -> IntegerWithUnits
fn clone(&self) -> IntegerWithUnits
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IntegerWithUnits
impl Debug for IntegerWithUnits
Source§impl Default for IntegerWithUnits
impl Default for IntegerWithUnits
Source§fn default() -> IntegerWithUnits
fn default() -> IntegerWithUnits
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IntegerWithUnits
impl<'de> Deserialize<'de> for IntegerWithUnits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for IntegerWithUnits
impl PartialEq for IntegerWithUnits
Source§impl Serialize for IntegerWithUnits
impl Serialize for IntegerWithUnits
impl StructuralPartialEq for IntegerWithUnits
Auto Trait Implementations§
impl Freeze for IntegerWithUnits
impl RefUnwindSafe for IntegerWithUnits
impl Send for IntegerWithUnits
impl Sync for IntegerWithUnits
impl Unpin for IntegerWithUnits
impl UnsafeUnpin for IntegerWithUnits
impl UnwindSafe for IntegerWithUnits
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