MacroParamElement

Trait MacroParamElement 

Source
pub trait MacroParamElement: Clone + Debug {
    // Required methods
    fn empty() -> Self;
    fn is_single(&self) -> bool;
    fn is_list(&self) -> bool;
    fn single_argument(&self) -> Cow<'_, str, Lean>;
    fn list_argument(&self) -> &[Box<Self>];
    fn must_be_evaluated(&self) -> bool;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Methods§

Source

fn empty() -> Self

Source

fn is_single(&self) -> bool

Source

fn is_list(&self) -> bool

Source

fn single_argument(&self) -> Cow<'_, str, Lean>

Source

fn list_argument(&self) -> &[Box<Self>]

Source

fn must_be_evaluated(&self) -> bool

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§