pub enum Lit {
Bool(LitBool),
Hex(LitHexStr),
Number(LitNumber),
Str(LitStr),
Unicode(LitUnicodeStr),
}
Expand description
A Solidity literal such as a string or integer or boolean.
Variants§
Bool(LitBool)
A boolean literal: true
or false
.
Hex(LitHexStr)
A hex string literal: hex"1234"
.
Number(LitNumber)
An integer or fixed-point number literal: 1
or 1.0
.
Str(LitStr)
A string literal.
Unicode(LitUnicodeStr)
A unicode string literal.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lit
impl RefUnwindSafe for Lit
impl !Send for Lit
impl !Sync for Lit
impl Unpin for Lit
impl UnwindSafe for Lit
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,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Bool
: 16 bytesHex
: 28 bytesNumber
: 20 bytesStr
: 28 bytesUnicode
: 28 bytes