pub enum SurfaceOp {
SetStop(StopOp<BlockRef>),
AddSolve(SolveOp<BlockRef>),
AddMacroSolve(MacroSolveOp<BlockRef>),
AddPickup(PickupOp<BlockRef>),
RemoveSolve {
surface: BlockRef,
what: SolveWhat,
},
RemovePickup {
dst: BlockRef,
what: String,
},
}Expand description
ブロックの surface_ops の操作(crate::FaceMods): serve の edit の set_stop・add_solve・add_pickup・remove_solve・
remove_pickup と同じ形で、面(surface・dst・src・other)はブロックの面 {"block": id, "surface": i} でも指せる
(当てる面 surface・dst の番号はそのブロックの面)。
remove_* はブロックの元(.zmx など)にあるソルブ・ピックアップを外す(無ければ当てずに注意)
Variants§
SetStop(StopOp<BlockRef>)
面を絞りにする
AddSolve(SolveOp<BlockRef>)
ソルブを置く
AddMacroSolve(MacroSolveOp<BlockRef>)
円錐係数・半直径・機械半径・面タイプのパラメータのマクロのソルブを置く
AddPickup(PickupOp<BlockRef>)
ピックアップを置く
RemoveSolve
ソルブを外す
RemovePickup
ピックアップを外す
Implementations§
Source§impl SurfaceOp
impl SurfaceOp
Sourcepub fn to_edit<E>(
&self,
f: impl FnMut(BlockRef) -> Result<Option<Ref>, E>,
) -> Result<Option<EditOp>, E>
pub fn to_edit<E>( &self, f: impl FnMut(BlockRef) -> Result<Option<Ref>, E>, ) -> Result<Option<EditOp>, E>
面を f で系の面に読み替えて編集の操作にする(f が None を返した面があれば当てない)
Sourcepub fn target_mut(&mut self) -> &mut BlockRef
pub fn target_mut(&mut self) -> &mut BlockRef
操作を当てる面(surface・dst。src・other は含めない)
Sourcepub fn stop_index(&self) -> Option<usize>
pub fn stop_index(&self) -> Option<usize>
番号で書いた面の set_stop の面の番号
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SurfaceOp
impl<'de> Deserialize<'de> for SurfaceOp
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 SurfaceOp
impl JsonSchema for SurfaceOp
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 SurfaceOp
Auto Trait Implementations§
impl Freeze for SurfaceOp
impl RefUnwindSafe for SurfaceOp
impl Send for SurfaceOp
impl Sync for SurfaceOp
impl Unpin for SurfaceOp
impl UnsafeUnpin for SurfaceOp
impl UnwindSafe for SurfaceOp
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,
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