general_tools::conversions::area

Struct Area

Source
pub struct Area {
    pub area_type: String,
    pub value: f64,
}

Fields§

§area_type: String§value: f64

Implementations§

Source§

impl Area

Source

pub fn new() -> Area

Creates a new Area instance

Source

pub fn to_square_micrometers(&self) -> f64

Returns the value of the granted area in square micrometers

Source

pub fn to_square_millimeters(&self) -> f64

Returns the value of the granted area in square millimeters

Source

pub fn to_square_centimeters(&self) -> f64

Returns the value of the granted area in square centimeters

Source

pub fn to_square_decimeters(&self) -> f64

Returns the value of the granted area in square decimeters

Source

pub fn to_square_meters(&self) -> f64

Returns the value of the granted area in square meters

Source

pub fn to_square_decameters(&self) -> f64

Returns the value of the area granted in square decameters

Source

pub fn to_square_hectometers(&self) -> f64

Returns the value of the granted area in square hectometers

Source

pub fn to_square_kilometers(&self) -> f64

Returns the value of the granted area in square kilometers

Source

pub fn to_square_megameters(&self) -> f64

Returns the value of the granted area in square megameters

Source

pub fn to_square_gigameters(&self) -> f64

Returns the value of the granted area in square gigameters

Source

pub fn to_square_terameters(&self) -> f64

Returns the value of the granted area in square terameters

Source

pub fn to_square_miles(&self) -> f64

Returns the value of the granted area in square miles

Source

pub fn to_square_yards(&self) -> f64

Returns the value of the granted area in square yards

Source

pub fn to_square_feet(&self) -> f64

Returns the value of the granted area in square feet

Source

pub fn to_square_inches(&self) -> f64

Returns the value of the granted area in square inches

Auto Trait Implementations§

§

impl Freeze for Area

§

impl RefUnwindSafe for Area

§

impl Send for Area

§

impl Sync for Area

§

impl Unpin for Area

§

impl UnwindSafe for Area

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.