Struct donet_core::parser::ast::NumericType
source · pub struct NumericType {
pub span: Span,
pub base_type: DCTypeEnum,
pub cast: Option<DataType>,
pub modulus: Option<f64>,
pub divisor: Option<f64>,
pub range: Option<Range<f64>>,
}
Expand description
Paired with the numeric_type
production in the Context Free Grammar.
Fields§
§span: Span
§base_type: DCTypeEnum
§cast: Option<DataType>
§modulus: Option<f64>
§divisor: Option<f64>
§range: Option<Range<f64>>
Implementations§
source§impl NumericType
impl NumericType
pub fn from_type(value: DCTypeEnum, span: Span) -> Self
pub fn add_modulus(&mut self, value: Number)
pub fn add_divisor(&mut self, value: Number)
Trait Implementations§
source§impl Clone for NumericType
impl Clone for NumericType
source§fn clone(&self) -> NumericType
fn clone(&self) -> NumericType
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 moreAuto Trait Implementations§
impl Freeze for NumericType
impl RefUnwindSafe for NumericType
impl Send for NumericType
impl Sync for NumericType
impl Unpin for NumericType
impl UnwindSafe for NumericType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)