pub struct Luminance {
    pub value: f64,
    pub unit: LuminanceUnit,
}
Expand description

Luminance (base unit candela per square meter, cd · m⁻²).

Fields§

§value: f64§unit: LuminanceUnit

Implementations§

source§

impl Luminance

source

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

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 to_quantity(&self) -> Quantity

Create a Quantity from this Luminance.

Trait Implementations§

source§

impl Clone for Luminance

source§

fn clone(&self) -> Luminance

Returns a copy of the value. Read more
1.0.0 · source§

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 From<Luminance> for LuminanceQuantity

source§

fn from(quantity: 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 PartialEq for Luminance

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Luminance

source§

impl StructuralPartialEq 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> 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,

§

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>,

§

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>,

§

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.