pub enum ParsedNumber {
HexOrByte(i128),
Other(f64),
}Expand description
An enum representing the return type of [Number::parse]..
Variants§
HexOrByte(i128)
A hex or byte, the Roblox’ maximum number is i64. But users may input
larger numbers, and for comparison, in linters for example, that maximum would be
stored as a i128, which is why that is the type used here.
Other(f64)
Other numbers in Roblox can go up to 2^53 which is covered well by the f64
type, it’s also used as these “other” numbers can have decimals in them.
Trait Implementations§
Source§impl Clone for ParsedNumber
impl Clone for ParsedNumber
Source§fn clone(&self) -> ParsedNumber
fn clone(&self) -> ParsedNumber
Returns a copy 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 ParsedNumber
impl Debug for ParsedNumber
Source§impl PartialEq for ParsedNumber
impl PartialEq for ParsedNumber
Source§impl PartialOrd for ParsedNumber
impl PartialOrd for ParsedNumber
impl StructuralPartialEq for ParsedNumber
Auto Trait Implementations§
impl Freeze for ParsedNumber
impl RefUnwindSafe for ParsedNumber
impl Send for ParsedNumber
impl Sync for ParsedNumber
impl Unpin for ParsedNumber
impl UnwindSafe for ParsedNumber
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