Trait Arg

Source
pub trait Arg: Any {
    // Required methods
    fn srepr(&self) -> String;
    fn clone_arg(&self) -> Box<dyn Arg>;

    // Provided methods
    fn as_expr(&self) -> Option<Box<dyn Expr>> { ... }
    fn map_expr(&self, f: &dyn Fn(&dyn Expr) -> Box<dyn Expr>) -> Box<dyn Arg> { ... }
}

Required Methods§

Source

fn srepr(&self) -> String

Source

fn clone_arg(&self) -> Box<dyn Arg>

Provided Methods§

Source

fn as_expr(&self) -> Option<Box<dyn Expr>>

Source

fn map_expr(&self, f: &dyn Fn(&dyn Expr) -> Box<dyn Expr>) -> Box<dyn Arg>

Trait Implementations§

Source§

impl AsAny for Box<dyn Arg>

Source§

fn as_any(&self) -> &dyn Any

Source§

impl Clone for Box<dyn Arg>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for &dyn Arg

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Debug for Box<dyn Arg>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Box<dyn Expr>> for Box<dyn Arg>

Source§

fn from(value: Box<dyn Expr>) -> Self

Converts to this type from the input type.

Implementations on Foreign Types§

Source§

impl Arg for isize

Source§

fn srepr(&self) -> String

Source§

fn clone_arg(&self) -> Box<dyn Arg>

Source§

impl Arg for usize

Source§

fn srepr(&self) -> String

Source§

fn clone_arg(&self) -> Box<dyn Arg>

Source§

impl Arg for Box<dyn Expr>

Source§

fn srepr(&self) -> String

Source§

fn clone_arg(&self) -> Box<dyn Arg>

Source§

fn as_expr(&self) -> Option<Box<dyn Expr>>

Source§

impl Arg for String

Source§

fn srepr(&self) -> String

Source§

fn clone_arg(&self) -> Box<dyn Arg>

Source§

impl<A: Arg + Clone> Arg for Vec<A>

Source§

fn srepr(&self) -> String

Source§

fn clone_arg(&self) -> Box<dyn Arg>

Source§

impl<A: Arg + Clone, B: Arg + Clone> Arg for (A, B)

Source§

fn srepr(&self) -> String

Source§

fn clone_arg(&self) -> Box<dyn Arg>

Implementors§

Source§

impl<T> Arg for T
where T: Expr,