pub trait Literal {
    // Required method
    fn lit(&self) -> Expr;
}
Expand description

Trait for converting a type to a Literal literal expression.

Required Methods§

source

fn lit(&self) -> Expr

convert the value to a Literal expression

Implementations on Foreign Types§

source§

impl Literal for f32

literal expression containing an f32

source§

fn lit(&self) -> Expr

source§

impl Literal for NonZeroI32

literal expression containing an i32

source§

fn lit(&self) -> Expr

source§

impl Literal for NonZeroU16

literal expression containing a u16

source§

fn lit(&self) -> Expr

source§

impl Literal for Vec<u8>

source§

fn lit(&self) -> Expr

source§

impl Literal for NonZeroU8

literal expression containing a u8

source§

fn lit(&self) -> Expr

source§

impl Literal for u64

literal expression containing a u64

source§

fn lit(&self) -> Expr

source§

impl Literal for String

source§

fn lit(&self) -> Expr

source§

impl Literal for ScalarValue

source§

fn lit(&self) -> Expr

source§

impl Literal for &String

source§

fn lit(&self) -> Expr

source§

impl Literal for NonZeroI8

literal expression containing an i8

source§

fn lit(&self) -> Expr

source§

impl Literal for u32

literal expression containing a u32

source§

fn lit(&self) -> Expr

source§

impl Literal for bool

literal expression containing a bool

source§

fn lit(&self) -> Expr

source§

impl Literal for u8

literal expression containing a u8

source§

fn lit(&self) -> Expr

source§

impl Literal for NonZeroI16

literal expression containing an i16

source§

fn lit(&self) -> Expr

source§

impl Literal for i8

literal expression containing an i8

source§

fn lit(&self) -> Expr

source§

impl Literal for u16

literal expression containing a u16

source§

fn lit(&self) -> Expr

source§

impl Literal for f64

literal expression containing an f64

source§

fn lit(&self) -> Expr

source§

impl Literal for &str

source§

fn lit(&self) -> Expr

source§

impl Literal for i64

literal expression containing an i64

source§

fn lit(&self) -> Expr

source§

impl Literal for &[u8]

source§

fn lit(&self) -> Expr

source§

impl Literal for NonZeroI64

literal expression containing an i64

source§

fn lit(&self) -> Expr

source§

impl Literal for i32

literal expression containing an i32

source§

fn lit(&self) -> Expr

source§

impl Literal for NonZeroU64

literal expression containing a u64

source§

fn lit(&self) -> Expr

source§

impl Literal for NonZeroU32

literal expression containing a u32

source§

fn lit(&self) -> Expr

source§

impl Literal for i16

literal expression containing an i16

source§

fn lit(&self) -> Expr

Implementors§