Struct Luminance

Source
pub struct Luminance { /* private fields */ }
Expand description

Luminance (base UnitDefinition candela per square meter, cd · m⁻²). Scalar storage of a quantity (f64 and LuminanceUnit).

Implementations§

Source§

impl Luminance

Source

pub fn new(value: f64, unit: LuminanceUnit) -> Self

Create a new LuminanceUnit.

Source

pub fn yottacandela_per_square_meter(value: f64) -> Self

Source

pub fn zettacandela_per_square_meter(value: f64) -> Self

Source

pub fn exacandela_per_square_meter(value: f64) -> Self

Source

pub fn petacandela_per_square_meter(value: f64) -> Self

Source

pub fn teracandela_per_square_meter(value: f64) -> Self

Source

pub fn gigacandela_per_square_meter(value: f64) -> Self

Source

pub fn megacandela_per_square_meter(value: f64) -> Self

Source

pub fn kilocandela_per_square_meter(value: f64) -> Self

Source

pub fn hectocandela_per_square_meter(value: f64) -> Self

Source

pub fn decacandela_per_square_meter(value: f64) -> Self

Source

pub fn candela_per_square_meter(value: f64) -> Self

Source

pub fn decicandela_per_square_meter(value: f64) -> Self

Source

pub fn centicandela_per_square_meter(value: f64) -> Self

Source

pub fn millicandela_per_square_meter(value: f64) -> Self

Source

pub fn microcandela_per_square_meter(value: f64) -> Self

Source

pub fn nanocandela_per_square_meter(value: f64) -> Self

Source

pub fn picocandela_per_square_meter(value: f64) -> Self

Source

pub fn femtocandela_per_square_meter(value: f64) -> Self

Source

pub fn attocandela_per_square_meter(value: f64) -> Self

Source

pub fn zeptocandela_per_square_meter(value: f64) -> Self

Source

pub fn yoctocandela_per_square_meter(value: f64) -> Self

Source

pub fn candela_per_square_picometer(value: f64) -> Self

Source

pub fn candela_per_square_nanometer(value: f64) -> Self

Source

pub fn candela_per_square_micrometer(value: f64) -> Self

Source

pub fn candela_per_square_millimeter(value: f64) -> Self

Source

pub fn candela_per_square_centimeter(value: f64) -> Self

Source

pub fn candela_per_square_kilometer(value: f64) -> Self

Source

pub fn candela_per_square_megameter(value: f64) -> Self

Source

pub fn candela_per_square_gigameter(value: f64) -> Self

Source

pub fn candela_per_square_terameter(value: f64) -> Self

Source

pub fn candela_per_square_inch(value: f64) -> Self

Source

pub fn candela_per_square_foot(value: f64) -> Self

Source

pub fn footlambert(value: f64) -> Self

Create a new Luminance with units of LuminanceUnit::footlambert.

Source

pub fn lambert(value: f64) -> Self

Create a new Luminance with units of LuminanceUnit::lambert.

Source

pub fn stilb(value: f64) -> Self

Create a new Luminance with units of LuminanceUnit::stilb.

Source

pub fn value(&self) -> f64

Retrieve the value associated with this Luminance.

Source

pub fn value_mut(&mut self) -> &mut f64

Retrieve the mutable value associated with this Luminance.

Source

pub fn definition(&self) -> UnitDefinition

Retrieve the UnitDefinition associated with this Luminance.

Source

pub fn to_yottacandela_per_square_meter(&self) -> Self

Source

pub fn to_zettacandela_per_square_meter(&self) -> Self

Source

pub fn to_exacandela_per_square_meter(&self) -> Self

Source

pub fn to_petacandela_per_square_meter(&self) -> Self

Source

pub fn to_teracandela_per_square_meter(&self) -> Self

Source

pub fn to_gigacandela_per_square_meter(&self) -> Self

Source

pub fn to_megacandela_per_square_meter(&self) -> Self

Source

pub fn to_kilocandela_per_square_meter(&self) -> Self

Source

pub fn to_hectocandela_per_square_meter(&self) -> Self

Source

pub fn to_decacandela_per_square_meter(&self) -> Self

Source

pub fn to_candela_per_square_meter(&self) -> Self

Source

pub fn to_decicandela_per_square_meter(&self) -> Self

Source

pub fn to_centicandela_per_square_meter(&self) -> Self

Source

pub fn to_millicandela_per_square_meter(&self) -> Self

Source

pub fn to_microcandela_per_square_meter(&self) -> Self

Source

pub fn to_nanocandela_per_square_meter(&self) -> Self

Source

pub fn to_picocandela_per_square_meter(&self) -> Self

Source

pub fn to_femtocandela_per_square_meter(&self) -> Self

Source

pub fn to_attocandela_per_square_meter(&self) -> Self

Source

pub fn to_zeptocandela_per_square_meter(&self) -> Self

Source

pub fn to_yoctocandela_per_square_meter(&self) -> Self

Source

pub fn to_candela_per_square_picometer(&self) -> Self

Source

pub fn to_candela_per_square_nanometer(&self) -> Self

Source

pub fn to_candela_per_square_micrometer(&self) -> Self

Source

pub fn to_candela_per_square_millimeter(&self) -> Self

Source

pub fn to_candela_per_square_centimeter(&self) -> Self

Source

pub fn to_candela_per_square_kilometer(&self) -> Self

Source

pub fn to_candela_per_square_megameter(&self) -> Self

Source

pub fn to_candela_per_square_gigameter(&self) -> Self

Source

pub fn to_candela_per_square_terameter(&self) -> Self

Source

pub fn to_candela_per_square_inch(&self) -> Self

Source

pub fn to_candela_per_square_foot(&self) -> Self

Source

pub fn to_footlambert(&self) -> Self

Source

pub fn to_lambert(&self) -> Self

Source

pub fn to_stilb(&self) -> Self

Trait Implementations§

Source§

impl Add<Quantity> for Luminance

Source§

type Output = Luminance

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Quantity) -> Self

Performs the + operation. Read more
Source§

impl Add for Luminance

Source§

type Output = Luminance

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Luminance) -> Self

Performs the + operation. Read more
Source§

impl AddAssign<Quantity> for Luminance

Source§

fn add_assign(&mut self, rhs: Quantity)

Performs the += operation. Read more
Source§

impl AddAssign for Luminance

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl Clone for Luminance

Source§

fn clone(&self) -> Luminance

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Luminance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Luminance

Source§

fn default() -> Luminance

Returns the “default value” for a type. Read more
Source§

impl<T: IsScalarQuantity> Div<T> for Luminance

Source§

type Output = Quantity

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Quantity

Performs the / operation. Read more
Source§

impl Div<f64> for Luminance

Source§

type Output = Luminance

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f64) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign<f64> for Luminance

Source§

fn div_assign(&mut self, rhs: f64)

Performs the /= operation. Read more
Source§

impl FixedQuantity<LuminanceUnit> for Luminance

Source§

fn unit(&self) -> LuminanceUnit

Return unit associated with this quantity
Source§

fn convert(&self, unit: LuminanceUnit) -> Self

Convert from this unit to another (creates a copy). No validation of base unit is made.
Source§

fn convert_mut(&mut self, unit: LuminanceUnit)

Convert from this unit to another (modifies current quantity). No validation of base unit is made.
Source§

fn unit_mut(&mut self) -> &mut LuminanceUnit

Return mutable unit associated with this quantity
Source§

fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>
where Self: Sized,

Try to convert from this unit to another (creates a copy)
Source§

impl From<&Luminance> for Units

Source§

fn from(value: &Luminance) -> Self

Converts to this type from the input type.
Source§

impl From<Luminance> for Quantity

Source§

fn from(quantity: Luminance) -> Self

Converts to this type from the input type.
Source§

impl From<Luminance> for UnitDefinition

Source§

fn from(value: Luminance) -> Self

Converts to this type from the input type.
Source§

impl From<Luminance> for Units

Source§

fn from(value: Luminance) -> Self

Converts to this type from the input type.
Source§

impl From<Quantity> for Luminance

Source§

fn from(quantity: Quantity) -> Luminance

Converts to this type from the input type.
Source§

impl<T: IsScalarQuantity> Mul<T> for Luminance

Source§

type Output = Quantity

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Quantity

Performs the * operation. Read more
Source§

impl Mul<f64> for Luminance

Source§

type Output = Luminance

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f64) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign<f64> for Luminance

Source§

fn mul_assign(&mut self, rhs: f64)

Performs the *= operation. Read more
Source§

impl PartialEq<Luminance> for Quantity

Source§

fn eq(&self, other: &Luminance) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Quantity> for Luminance

Source§

fn eq(&self, other: &Quantity) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Luminance

Source§

fn eq(&self, other: &Luminance) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Luminance

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Sub<Quantity> for Luminance

Source§

type Output = Luminance

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Quantity) -> Self

Performs the - operation. Read more
Source§

impl Sub for Luminance

Source§

type Output = Luminance

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Luminance) -> Self

Performs the - operation. Read more
Source§

impl SubAssign<Quantity> for Luminance

Source§

fn sub_assign(&mut self, rhs: Quantity)

Performs the -= operation. Read more
Source§

impl SubAssign for Luminance

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl Copy for Luminance

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.