Enum AstConstantInteger
pub enum AstConstantInteger {
Char(i8),
Short(i16),
Int(i32),
LongLong(i64),
UnsignedChar(u8),
UnsignedShort(u16),
UnsignedInt(u32),
UnsignedLongLong(u64),
}Expand description
A constant integer value.
Variants§
Char(i8)
Short(i16)
Int(i32)
LongLong(i64)
UnsignedChar(u8)
UnsignedShort(u16)
UnsignedInt(u32)
UnsignedLongLong(u64)
Implementations§
§impl AstConstantInteger
impl AstConstantInteger
pub fn from_value<T: Into<AstConstantInteger>>(value: T) -> Self
pub fn from_value<T: Into<AstConstantInteger>>(value: T) -> Self
Makes an AstConstantInteger with the appropriate discriminant from the given value.
pub fn get_ast_type(&self) -> AstType
pub fn get_ast_type(&self) -> AstType
Gets the AST type of the constant integer value.
Trait Implementations§
§impl Clone for AstConstantInteger
impl Clone for AstConstantInteger
§fn clone(&self) -> AstConstantInteger
fn clone(&self) -> AstConstantInteger
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 more§impl Debug for AstConstantInteger
impl Debug for AstConstantInteger
§impl Display for AstConstantInteger
impl Display for AstConstantInteger
§impl From<AstConstantInteger> for BtConstantValue
impl From<AstConstantInteger> for BtConstantValue
§fn from(value: AstConstantInteger) -> Self
fn from(value: AstConstantInteger) -> Self
Converts to this type from the input type.
§impl From<AstConstantInteger> for BtValue
impl From<AstConstantInteger> for BtValue
§fn from(value: AstConstantInteger) -> Self
fn from(value: AstConstantInteger) -> Self
Converts to this type from the input type.
§impl From<i16> for AstConstantInteger
impl From<i16> for AstConstantInteger
§impl From<i32> for AstConstantInteger
impl From<i32> for AstConstantInteger
§impl From<i64> for AstConstantInteger
impl From<i64> for AstConstantInteger
§impl From<i8> for AstConstantInteger
impl From<i8> for AstConstantInteger
§impl From<u16> for AstConstantInteger
impl From<u16> for AstConstantInteger
§impl From<u32> for AstConstantInteger
impl From<u32> for AstConstantInteger
§impl From<u64> for AstConstantInteger
impl From<u64> for AstConstantInteger
§impl From<u8> for AstConstantInteger
impl From<u8> for AstConstantInteger
§impl Hash for AstConstantInteger
impl Hash for AstConstantInteger
§impl Ord for AstConstantInteger
impl Ord for AstConstantInteger
§fn cmp(&self, other: &AstConstantInteger) -> Ordering
fn cmp(&self, other: &AstConstantInteger) -> 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
§impl PartialEq for AstConstantInteger
impl PartialEq for AstConstantInteger
§impl PartialOrd for AstConstantInteger
impl PartialOrd for AstConstantInteger
impl Copy for AstConstantInteger
impl Eq for AstConstantInteger
impl StructuralPartialEq for AstConstantInteger
Auto Trait Implementations§
impl Freeze for AstConstantInteger
impl RefUnwindSafe for AstConstantInteger
impl Send for AstConstantInteger
impl Sync for AstConstantInteger
impl Unpin for AstConstantInteger
impl UnwindSafe for AstConstantInteger
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