Enum csvenum::NumericType

source ·
pub enum NumericType {
Show 13 variants i8, i16, i32, i64, u8, u16, u32, u64, u128, f32, f64, isize, usize,
}
Expand description

Represents all numeric types

Variants§

§

i8

i8

Property typestr with value i8

§

i16

i16

Property typestr with value i16

§

i32

i32

Property typestr with value i32

§

i64

i64

Property typestr with value i64

§

u8

u8

Property typestr with value u8

§

u16

u16

Property typestr with value u16

§

u32

u32

Property typestr with value u32

§

u64

u64

Property typestr with value u64

§

u128

u128

Property typestr with value u128

§

f32

f32

Property typestr with value f32

§

f64

f64

Property typestr with value f64

§

isize

isize

Property typestr with value isize

§

usize

usize

Property typestr with value usize

Implementations§

Trait Implementations§

source§

impl Debug for NumericType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for NumericType

source§

fn eq(&self, other: &NumericType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl RTypeTrait for NumericType

source§

fn from_typestr<T: AsRef<str>>(typestr: T) -> Result<Self, TypeError>
where Self: Sized,

Construct the RType from a string that contains type information i.e. “ &str “ Read more
source§

fn to_typestr(&self) -> String

Conversions into type representation Read more
source§

fn to_typestr_no_ref(&self) -> String

get representation without references or lifetimes str
source§

fn to_typestr_no_life(&self) -> String

get representation without lifetime &str
source§

fn collect_lifetimes(&self, into: &mut Vec<String>)

collect lifetimes
source§

fn is_const(&self) -> bool

get if the type can be declared as const Read more
source§

fn value_is_valid(&self, valuestr: &str) -> bool

Value is valid - assume an input of (2,2,[2,3,4]) -> Tuple(NumType,NumType,Array|Vec) Read more
source§

fn get_depth(&self, counter: usize) -> usize

Get nesting depth
source§

fn get_breadth(&self, counter: usize) -> usize

Get nesting breadth
source§

fn wrap_valuestr(&self, valuestr: &str) -> String

source§

fn can_match_as_key(&self) -> bool

Whether the type can be used as the key in a match expression, floats can not.
source§

impl Eq for NumericType

source§

impl StructuralPartialEq for NumericType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.