pub trait StatementLike: StatementLike { }
Expand description

Everything that is a statement.

fn type_is_a_stmt<T: StatementLike>() {}

type_is_a_stmt::<Cow<'_, str>>();
type_is_a_stmt::<&'_ str>();
type_is_a_stmt::<String>();
type_is_a_stmt::<Box<str>>();
type_is_a_stmt::<Arc<str>>();
type_is_a_stmt::<Statement>();

fn ref_to_a_clonable_stmt_is_also_a_stmt<T: StatementLike + Clone>() {
    type_is_a_stmt::<&T>();
}

Implementors§

source§

impl<T: StatementLike> StatementLike for T