pub enum AstLiteral {
Null,
Integer(i128),
Date(Date),
DateAndTime(DateAndTime),
TimeOfDay(TimeOfDay),
Time(Time),
Real(String),
Bool(bool),
String(StringValue),
Array(Array),
}Variants§
Null
a null literal used to initialize pointers
Integer(i128)
a literal that represents a whole number (e.g. 7)
Date(Date)
a literal that represents a date
DateAndTime(DateAndTime)
a literal that represents a date and time
TimeOfDay(TimeOfDay)
a literal that represents the time of day
Time(Time)
a literal that represents a time period
Real(String)
a literal that represents a real number (e.g. 7.0)
Bool(bool)
a literal that represents a boolean value (true, false)
String(StringValue)
a literal that represents a string
Array(Array)
a literal that represents an array
Implementations§
Source§impl AstLiteral
impl AstLiteral
Sourcepub fn new_integer(value: i128) -> Self
pub fn new_integer(value: i128) -> Self
Creates a new literal integer
Sourcepub fn new_string(value: String, is_wide: bool) -> Self
pub fn new_string(value: String, is_wide: bool) -> Self
Creates a new literal string
Sourcepub fn new_date_with_long_flag(
year: i32,
month: u32,
day: u32,
is_long: bool,
) -> Self
pub fn new_date_with_long_flag( year: i32, month: u32, day: u32, is_long: bool, ) -> Self
Creates a new literal date with explicit width flavor
Sourcepub fn new_date_and_time(
year: i32,
month: u32,
day: u32,
hour: u32,
min: u32,
sec: u32,
nano: u32,
) -> Self
pub fn new_date_and_time( year: i32, month: u32, day: u32, hour: u32, min: u32, sec: u32, nano: u32, ) -> Self
Creates a new literal date and time
Sourcepub fn new_long_date_and_time(
year: i32,
month: u32,
day: u32,
hour: u32,
min: u32,
sec: u32,
nano: u32,
) -> Self
pub fn new_long_date_and_time( year: i32, month: u32, day: u32, hour: u32, min: u32, sec: u32, nano: u32, ) -> Self
Creates a new long literal date and time
Sourcepub fn new_time_of_day(hour: u32, min: u32, sec: u32, nano: u32) -> Self
pub fn new_time_of_day(hour: u32, min: u32, sec: u32, nano: u32) -> Self
Creates a new literal time of day
Sourcepub fn new_time_of_day_with_long_flag(
hour: u32,
min: u32,
sec: u32,
nano: u32,
is_long: bool,
) -> Self
pub fn new_time_of_day_with_long_flag( hour: u32, min: u32, sec: u32, nano: u32, is_long: bool, ) -> Self
Creates a new literal time of day with explicit width flavor
pub fn get_literal_value(&self) -> String
pub fn is_cast_prefix_eligible(&self) -> bool
pub fn is_numerical(&self) -> bool
pub fn is_zero(&self) -> bool
pub fn get_literal_integer_value(&self) -> Option<i128>
Trait Implementations§
Source§impl Clone for AstLiteral
impl Clone for AstLiteral
Source§fn clone(&self) -> AstLiteral
fn clone(&self) -> AstLiteral
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AstLiteral
impl Debug for AstLiteral
Source§impl<'de> Deserialize<'de> for AstLiteralwhere
'de: 'static,
impl<'de> Deserialize<'de> for AstLiteralwhere
'de: 'static,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AstLiteral
impl PartialEq for AstLiteral
Source§fn eq(&self, other: &AstLiteral) -> bool
fn eq(&self, other: &AstLiteral) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AstLiteral
impl Serialize for AstLiteral
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime Array
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime Array
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime Date
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime Date
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime DateAndTime
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime DateAndTime
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime String
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime String
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime StringValue
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime StringValue
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime Time
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime Time
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime TimeOfDay
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime TimeOfDay
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime bool
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime bool
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime i128
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for &'__deriveMoreLifetime i128
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for ()
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstLiteral> for ()
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
type Error = TryIntoError<&'__deriveMoreLifetime AstLiteral>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstStatement> for &'__deriveMoreLifetime AstLiteral
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime AstStatement> for &'__deriveMoreLifetime AstLiteral
Source§type Error = TryIntoError<&'__deriveMoreLifetime AstStatement>
type Error = TryIntoError<&'__deriveMoreLifetime AstStatement>
The type returned in the event of a conversion error.
Source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime mut AstStatement> for &'__deriveMoreLifetime mut AstLiteral
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime mut AstStatement> for &'__deriveMoreLifetime mut AstLiteral
Source§type Error = TryIntoError<&'__deriveMoreLifetime mut AstStatement>
type Error = TryIntoError<&'__deriveMoreLifetime mut AstStatement>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for ()
impl TryFrom<AstLiteral> for ()
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for Array
impl TryFrom<AstLiteral> for Array
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for Date
impl TryFrom<AstLiteral> for Date
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for DateAndTime
impl TryFrom<AstLiteral> for DateAndTime
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for String
impl TryFrom<AstLiteral> for String
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for StringValue
impl TryFrom<AstLiteral> for StringValue
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for Time
impl TryFrom<AstLiteral> for Time
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for TimeOfDay
impl TryFrom<AstLiteral> for TimeOfDay
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for bool
impl TryFrom<AstLiteral> for bool
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstLiteral> for i128
impl TryFrom<AstLiteral> for i128
Source§type Error = TryIntoError<AstLiteral>
type Error = TryIntoError<AstLiteral>
The type returned in the event of a conversion error.
Source§impl TryFrom<AstStatement> for AstLiteral
impl TryFrom<AstStatement> for AstLiteral
Source§type Error = TryIntoError<AstStatement>
type Error = TryIntoError<AstStatement>
The type returned in the event of a conversion error.
Source§impl Walker for AstLiteral
impl Walker for AstLiteral
fn walk<V>(&self, _visitor: &mut V)where
V: AstVisitor,
Source§impl WalkerMut for AstLiteral
impl WalkerMut for AstLiteral
fn walk<V>(&mut self, _visitor: &mut V)where
V: AstVisitorMut,
impl StructuralPartialEq for AstLiteral
Auto Trait Implementations§
impl Freeze for AstLiteral
impl RefUnwindSafe for AstLiteral
impl Send for AstLiteral
impl Sync for AstLiteral
impl Unpin for AstLiteral
impl UnsafeUnpin for AstLiteral
impl UnwindSafe for AstLiteral
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