Struct KzuExpressionValidatorOperation
#[repr(transparent)]pub struct KzuExpressionValidatorOperation(pub i32);Expand description
Expression operation.
Each operation in an expression binding is identified by an integer operation code.
All operations that can be executed component-wise are executed per-component. For example, the division of two vector2 components is [param1.x / param2.x, param1.y / param2.y]. The same applies to single-parameter operations. For example, absolute value is [abs(param1.x), abs(param1.y)].
You can define arguments specifying an arbitrary rotation as either SRT3D Euler rotations or quaternions.
Operations are encoded as follows:
- Operation codes from the binary use only the first byte: 0-255.
- Engine-only operations, e.g. constraints use 256 and the first byte: 256-511.
- Animation validators use 512 and the first byte: 512-767
Since only the operation codes come from the binary format, the remaining values can be mapped anywhere without breaking loading.
The encoding intentionally ensures only 16 bits are needed for the enumeration.
Tuple Fields§
§0: i32Implementations§
§impl KzuExpressionValidatorOperation
impl KzuExpressionValidatorOperation
pub fn convert(num: i32) -> KzuExpressionValidatorOperation
Trait Implementations§
§impl Clone for KzuExpressionValidatorOperation
impl Clone for KzuExpressionValidatorOperation
§fn clone(&self) -> KzuExpressionValidatorOperation
fn clone(&self) -> KzuExpressionValidatorOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for KzuExpressionValidatorOperation
impl Debug for KzuExpressionValidatorOperation
§impl VariantConstraint for KzuExpressionValidatorOperation
impl VariantConstraint for KzuExpressionValidatorOperation
§type DataArg<'a> = KzuExpressionValidatorOperation
type DataArg<'a> = KzuExpressionValidatorOperation
Specifies the type of an argument that provides a value to
Variant.
Generally, this type matches Self, except for KanziString, Resource, and ResourceId. Read more§fn as_arg(
&self,
) -> <KzuExpressionValidatorOperation as VariantConstraint>::DataArg<'_>
fn as_arg( &self, ) -> <KzuExpressionValidatorOperation as VariantConstraint>::DataArg<'_>
impl Copy for KzuExpressionValidatorOperation
impl Eq for KzuExpressionValidatorOperation
impl PropertyTypeConstraint for KzuExpressionValidatorOperation
impl StructuralPartialEq for KzuExpressionValidatorOperation
Auto Trait Implementations§
impl Freeze for KzuExpressionValidatorOperation
impl RefUnwindSafe for KzuExpressionValidatorOperation
impl Send for KzuExpressionValidatorOperation
impl Sync for KzuExpressionValidatorOperation
impl Unpin for KzuExpressionValidatorOperation
impl UnwindSafe for KzuExpressionValidatorOperation
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