Trait rune::macros::IntoLit

source ·
pub trait IntoLit {
    // Required method
    fn into_lit(self, cx: &mut MacroContext<'_, '_, '_>) -> Result<Lit>;
}
Expand description

Helper trait used for things that can be converted into tokens.

Required Methods§

source

fn into_lit(self, cx: &mut MacroContext<'_, '_, '_>) -> Result<Lit>

Convert the current thing into a token.

Implementations on Foreign Types§

source§

impl IntoLit for &str

source§

fn into_lit(self, cx: &mut MacroContext<'_, '_, '_>) -> Result<Lit>

source§

impl IntoLit for &[u8]

source§

fn into_lit(self, cx: &mut MacroContext<'_, '_, '_>) -> Result<Lit>

source§

impl IntoLit for char

source§

fn into_lit(self, cx: &mut MacroContext<'_, '_, '_>) -> Result<Lit>

source§

impl IntoLit for u8

source§

fn into_lit(self, cx: &mut MacroContext<'_, '_, '_>) -> Result<Lit>

source§

impl<const N: usize> IntoLit for &[u8; N]

source§

fn into_lit(self, cx: &mut MacroContext<'_, '_, '_>) -> Result<Lit>

source§

impl<const N: usize> IntoLit for [u8; N]

source§

fn into_lit(self, cx: &mut MacroContext<'_, '_, '_>) -> Result<Lit>

Implementors§

source§

impl IntoLit for &String

source§

impl IntoLit for String

source§

impl<T> IntoLit for T
where Number: From<T>,