rune::macros

Trait 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<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>,