pub struct ConfigRow {
pub param: Param,
pub values: Vec<f64>,
pub names: Vec<String>,
pub picks: Vec<ConfigPick>,
}Expand description
多重構成の表の 1 行
Fields§
§param: Param§values: Vec<f64>構成ごとの値(長さは構成の数)。ピックアップの構成の値は元の構成から求めた値。
材料・膜の行(Kind::Material・Kind::Coating)は names の番号(0 始まり)
names: Vec<String>材料の行の材料の名前(面の表の材料と同じ書き方)、膜の行の膜の名前(空は膜なし)。ほかの行は空で、省く
picks: Vec<ConfigPick>構成のピックアップ(OpticStudio の多重構成の pickup)。無ければ省く
Implementations§
Source§impl ConfigRow
impl ConfigRow
Sourcepub fn resolve_picks(&mut self)
pub fn resolve_picks(&mut self)
同じ行からのピックアップの値を元の構成から求め直す(ピックアップの元がピックアップでも、並びの順によらず)。
別の行からのピックアップは Configs::resolve_picks
Sourcepub fn pick(&self, k: usize) -> Option<&ConfigPick>
pub fn pick(&self, k: usize) -> Option<&ConfigPick>
構成 k のピックアップ
Sourcepub fn is_material(&self) -> bool
pub fn is_material(&self) -> bool
材料の行か
Sourcepub fn is_coating(&self) -> bool
pub fn is_coating(&self) -> bool
膜の行か
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ConfigRow
impl<'de> Deserialize<'de> for ConfigRow
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 JsonSchema for ConfigRow
impl JsonSchema for ConfigRow
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for ConfigRow
Auto Trait Implementations§
impl Freeze for ConfigRow
impl RefUnwindSafe for ConfigRow
impl Send for ConfigRow
impl Sync for ConfigRow
impl Unpin for ConfigRow
impl UnsafeUnpin for ConfigRow
impl UnwindSafe for ConfigRow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more