Skip to main content

Request

Enum Request 

Source
pub enum Request {
Show 45 variants Load(Box<LoadReq>), Reload { history: LoadHistory, }, System, Undo { steps: usize, }, Redo { steps: usize, }, History, Get(GetReq), Set { values: Vec<(String, f64)>, }, Write { path: PathBuf, thermal: Option<ThermalReq>, }, Edit { ops: Vec<EditOp>, }, Surfaces, SurfaceData { surface: Ref, }, SystemData, ConfigTable, Configs, WriteBack { ops: Vec<EditOp>, }, Save { path: PathBuf, }, SaveRange { path: PathBuf, from: usize, to: usize, }, Analyze(Box<AnalyzeReq>), Layout(Box<LayoutReq>), LayoutExport(Box<LayoutExportReq>), Preview { load: Box<LoadReq>, layout: Box<LayoutReq>, }, Trace(Box<TraceReq>), Plugin(Box<PluginReq>), Optimize(Box<OptimizeParams>), Swap(Box<SwapReq>), Tolerance(Box<TolReq>), Zoom(Box<ZoomParams>), Ping, Describe, Shutdown, Surface { surface: Ref, }, ConfigDiff, SaveProject { path: PathBuf, }, Plugins, AnalysisArgs { cmd: String, }, Glasses(BrowseReq), Lenses(BrowseReq), CatalogSearch(Box<SearchReq>), CatalogAdd(Box<CatalogAddReq>), CatalogItems { catalog: String, }, CatalogEdit(Box<CatalogEditReq>), CatalogFill(Box<CatalogFillReq>), CadStep(Box<CadStepReq>), Json { method: String, params: Value, },
}
Expand description

1 つの要求

Variants§

§

Load(Box<LoadReq>)

§

Reload

同じ読み方でファイルを読み直す

Fields

§history: LoadHistory
§

System

読み込んだ系の概要

§

Undo

元に戻す・やり直す(段の数、1 以上)

Fields

§steps: usize
§

Redo

Fields

§steps: usize
§

History

§

Get(GetReq)

§

Set

パラメータの値を変える(名前と値、順に)

Fields

§values: Vec<(String, f64)>
§

Write

系を .zmx に書き出す(thermal を与えれば、熱の構成を作った系を)

Fields

§path: PathBuf
§

Edit

系の編集の操作を順に当てる

Fields

§

Surfaces

全部の面の値(surface で面を指定しないとき)

§

SurfaceData

面のデータを全部の項目で(面の番号か名前)

Fields

§surface: Ref
§

SystemData

系の設定(波長・視野・開口など)

§

ConfigTable

多重構成の表

§

Configs

レイアウト図に重ねられる構成

§

WriteBack

面の操作をプロジェクトのブロックへ書き戻した結果(保存しない)

Fields

§

Save

系ファイルに保存する

Fields

§path: PathBuf
§

SaveRange

面 from〜to だけを系ファイルに書き出す

Fields

§path: PathBuf
§from: usize
§

Analyze(Box<AnalyzeReq>)

解析を回す

§

Layout(Box<LayoutReq>)

レイアウト図

§

LayoutExport(Box<LayoutExportReq>)

レイアウトをファイルに書き出す

§

Preview

系をファイルから読んでレイアウト図を作る(読み込んだ系は変えない)。同じプロセスの呼び手だけ(serve の method には無い。GUI の組合せの図の下書き)

Fields

§load: Box<LoadReq>
§layout: Box<LayoutReq>
§

Trace(Box<TraceReq>)

正規化瞳座標の光線を追う

§

Plugin(Box<PluginReq>)

解析・検出器のプラグインを 1 回呼ぶ

§

Optimize(Box<OptimizeParams>)

減衰最小二乗の最適化

§

Swap(Box<SwapReq>)

カタログレンズの差し替え探索

§

Tolerance(Box<TolReq>)

モンテカルロ公差

§

Zoom(Box<ZoomParams>)

ズーム軌跡

§

Ping

版

§

Describe

版・プロトコル・method・解析の名前

§

Shutdown

serve を終える

§

Surface

1 つの面の値(面の番号か名前)

Fields

§surface: Ref
§

ConfigDiff

.zmx の多重構成を表にする edit の操作

§

SaveProject

読み込んだプロジェクトに読み込んだ後の変更を書き戻して保存する

Fields

§path: PathBuf
§

Plugins

解析・検出器のプラグイン

§

AnalysisArgs

analyze の解析の設定の項目(解析の名前)

Fields

§

Glasses(BrowseReq)

ガラスの一覧

§

Lenses(BrowseReq)

レンズの一覧

§

CatalogSearch(Box<SearchReq>)

カタログを探す

§

CatalogAdd(Box<CatalogAddReq>)

読み込んだプロジェクトのブロックをユーザーカタログの項目に

§

CatalogItems

ユーザーカタログの項目の一覧

Fields

§catalog: String
§

CatalogEdit(Box<CatalogEditReq>)

ユーザーカタログの項目の名前・説明の変更と削除

§

CatalogFill(Box<CatalogFillReq>)

カタログの未完の品を補って補足のカタログに書く

§

CadStep(Box<CadStepReq>)

品の STEP を取ってキャッシュに置く

§

Json

型をまだ付けていない method(params は serve の JSON)

Fields

§method: String
§params: Value

Implementations§

Source§

impl Request

Source

pub fn json(method: impl Into<String>, params: Value) -> Request

型をまだ付けていない method の要求

Source

pub fn method(&self) -> &str

serve の method の名前

Source

pub fn from_json(method: &str, p: &Value) -> Result<Request, CallError>

serve の method と JSON の params を型の要求に(読めなければ serve と同じ誤り。読む所の panic も誤り)。 型を付けていない method は Request::Json

Trait Implementations§

Source§

impl Clone for Request

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Request

Source§

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

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

impl<'de> Deserialize<'de> for Request

Source§

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 PartialEq for Request

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for Request

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Request

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Parallelizable for T
where T: Send + Sync,

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,