#[non_exhaustive]pub enum ModifyOp {
Add,
Subtract,
Multiply,
Divide,
Modulo,
Min,
Max,
RaiseToPower,
AppendToArray,
RemoveFromArrayByValue,
RemoveFromArrayByIndex,
}Expand description
The operation used by a Workshop variable modification action.
Workshop can add modification operations independently of this crate. Consumers should use a wildcard arm when matching this type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Add
Subtract
Multiply
Divide
Modulo
Min
Max
RaiseToPower
AppendToArray
RemoveFromArrayByValue
RemoveFromArrayByIndex
Implementations§
Source§impl ModifyOp
impl ModifyOp
Sourcepub fn from_catalog_id(id: &str) -> Option<Self>
pub fn from_catalog_id(id: &str) -> Option<Self>
The operation a catalog operator id names (add,
removeFromArrayByIndex, …) — the accepted set the paramContent
operations fact declares for modify parameters. None for any
other catalog id.
Sourcepub fn catalog_id(self) -> &'static str
pub fn catalog_id(self) -> &'static str
The canonical catalog operator id (add, removeFromArrayByIndex)
the Workshop modify-operator position resolves this operation from.
Public since rule-content-v1 names modify operands by this id.
Trait Implementations§
impl Copy for ModifyOp
impl Eq for ModifyOp
impl StructuralPartialEq for ModifyOp
Auto Trait Implementations§
impl Freeze for ModifyOp
impl RefUnwindSafe for ModifyOp
impl Send for ModifyOp
impl Sync for ModifyOp
impl Unpin for ModifyOp
impl UnsafeUnpin for ModifyOp
impl UnwindSafe for ModifyOp
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