Skip to main content

ConditionClass

Trait ConditionClass 

Source
pub trait ConditionClass {
    // Required method
    fn into_condition_class(self) -> Vec<String>;
}
Expand description

What the condition macros’ class = … (and RError::class) accept: one class or several, as &str / String / arrays / Vec / slices.

The classes are prepended in order to the rust_* layering, so put the most specific first: class = ["pkg_error_missing_field", "pkg_error"] renders as c("pkg_error_missing_field", "pkg_error", "rust_error", …) and both tryCatch(pkg_error_missing_field = …) and tryCatch(pkg_error = …) match.

Required Methods§

Source

fn into_condition_class(self) -> Vec<String>

The class vector, most specific first.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ConditionClass for &String

Source§

impl ConditionClass for &[&str]

Source§

impl ConditionClass for &[String]

Source§

impl ConditionClass for &str

Source§

impl ConditionClass for String

Source§

impl ConditionClass for Vec<&str>

Source§

impl ConditionClass for Vec<String>

Source§

impl<const N: usize> ConditionClass for [&str; N]

Source§

impl<const N: usize> ConditionClass for [String; N]

Implementors§