pub enum LuauNumber {
Plain(SmolStr),
Binary(SmolStr),
Hex(SmolStr),
}Expand description
A luau number. The stored string will include the 0b, or 0x in case of
binary and hexadecimal respectively.
The only reason the different types actually exist is to allow the user to easily know which one is used without needing to check the actual string.
Variants§
Trait Implementations§
Source§impl Clone for LuauNumber
impl Clone for LuauNumber
Source§fn clone(&self) -> LuauNumber
fn clone(&self) -> LuauNumber
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 moreSource§impl Debug for LuauNumber
impl Debug for LuauNumber
Source§impl From<LuauNumber> for Literal
impl From<LuauNumber> for Literal
Source§fn from(value: LuauNumber) -> Literal
fn from(value: LuauNumber) -> Literal
Converts to this type from the input type.
Source§impl Hash for LuauNumber
impl Hash for LuauNumber
Source§impl Lexable for LuauNumber
impl Lexable for LuauNumber
Source§impl Ord for LuauNumber
impl Ord for LuauNumber
Source§fn cmp(&self, other: &LuauNumber) -> Ordering
fn cmp(&self, other: &LuauNumber) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LuauNumber
impl PartialEq for LuauNumber
Source§impl PartialOrd for LuauNumber
impl PartialOrd for LuauNumber
impl Eq for LuauNumber
impl StructuralPartialEq for LuauNumber
Auto Trait Implementations§
impl Freeze for LuauNumber
impl RefUnwindSafe for LuauNumber
impl Send for LuauNumber
impl Sync for LuauNumber
impl Unpin for LuauNumber
impl UnwindSafe for LuauNumber
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