pub struct Material {
pub shelf: String,
pub book: String,
pub page: String,
pub comments: String,
pub references: String,
pub data: Vec<DispersionData>,
}Expand description
A single item in the store containing materials data.
Fields§
§shelf: String§book: String§page: String§comments: String§references: String§data: Vec<DispersionData>Implementations§
Source§impl Material
impl Material
Sourcepub fn n(&self, wavelength: f64) -> Result<f64>
pub fn n(&self, wavelength: f64) -> Result<f64>
Computes the real part of the refractive index of the material at the given wavelength.
§Arguments
wavelength: The wavelength at which to evaluate the refractive index.
§Returns
The real part of the refractive index of the material at the given wavelength.
§Errors
- If no real data is found for the item.
- If the wavelength is outside the range of the real data.
Sourcepub fn k(&self, wavelength: f64) -> Result<Option<f64>>
pub fn k(&self, wavelength: f64) -> Result<Option<f64>>
Computes the imaginary part of the refractive index of the material at the given wavelength.
§Arguments
wavelength: The wavelength at which to evaluate the refractive index.
§Returns
The imaginary part of the refractive index of the material at the given wavelength.
§Errors
- If the wavelength is outside the range of the imaginary data.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Material
impl<'de> Deserialize<'de> for Material
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
Auto Trait Implementations§
impl Freeze for Material
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnwindSafe for Material
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