pub struct Param {
pub name: String,
pub ty: ParamTy,
pub default: Value,
pub optional: bool,
pub doc: String,
pub unit: String,
pub choices: Vec<String>,
pub min: Option<f64>,
pub len: Option<usize>,
pub write: bool,
}Expand description
設定の 1 項目(スキーマから作る)
Fields§
§name: String鍵(下線。CLI の旗は下線をハイフンに)
ty: ParamTy§default: Value既定値(Default の値。省けるものは null)
optional: bool省いてよい(値が null になる)
doc: String説明(スキーマの description)
unit: String単位(スキーマの x-unit)
choices: Vec<String>選べる値(ParamTy::Choice)
min: Option<f64>数の下限
len: Option<usize>並びの長さが決まっていれば(中心の “x,y” など)
write: bool書き出すファイル・フォルダのパス(スキーマの x-write。serve は書いてよい場所かを確かめる)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Param
impl RefUnwindSafe for Param
impl Send for Param
impl Sync for Param
impl Unpin for Param
impl UnsafeUnpin for Param
impl UnwindSafe for Param
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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