pub enum YarnValue {
Str(String),
Bool(bool),
Number(f32),
Null,
}Variants§
Implementations§
Source§impl YarnValue
impl YarnValue
pub fn as_string(&self) -> String
pub fn as_number(&self) -> f32
pub fn as_bool(&self) -> bool
pub fn add(&self, other: &Self) -> Option<Self>
pub fn sub(&self, other: &Self) -> Option<Self>
pub fn mul(&self, other: &Self) -> Option<Self>
pub fn div(&self, other: &Self) -> Option<Self>
pub fn neg(&self) -> Self
pub fn rem(&self, other: &Self) -> Option<Self>
Trait Implementations§
Source§impl PartialOrd for YarnValue
impl PartialOrd for YarnValue
impl StructuralPartialEq for YarnValue
Auto Trait Implementations§
impl Freeze for YarnValue
impl RefUnwindSafe for YarnValue
impl Send for YarnValue
impl Sync for YarnValue
impl Unpin for YarnValue
impl UnwindSafe for YarnValue
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