pub enum Val {
Bool(bool),
Int(i32),
Float(f32),
Vec3([f32; 3]),
Entity(Entity),
}Expand description
A value flowing through a behavior body.
Variants§
Bool(bool)
A boolean.
Int(i32)
A signed integer.
Float(f32)
A float.
Vec3([f32; 3])
A 3-component vector.
Entity(Entity)
An entity handle.
Implementations§
Source§impl Val
impl Val
Sourcepub fn as_f32(self) -> Option<f32>
pub fn as_f32(self) -> Option<f32>
The scalar reading of a numeric value, for mixed vector/scalar forms.
Sourcepub fn from_literal(lit: &BehaviorLiteral) -> Val
pub fn from_literal(lit: &BehaviorLiteral) -> Val
The runtime value an authored literal denotes.
Sourcepub fn to_literal(self) -> BehaviorLiteral
pub fn to_literal(self) -> BehaviorLiteral
The authored form, for persistence. Entities have no authored form and are never persisted, so they save as their declared-away default.
Trait Implementations§
impl Copy for Val
impl StructuralPartialEq for Val
Auto Trait Implementations§
impl Freeze for Val
impl RefUnwindSafe for Val
impl Send for Val
impl Sync for Val
impl Unpin for Val
impl UnsafeUnpin for Val
impl UnwindSafe for Val
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