MessageValue

Trait MessageValue 

Source
pub trait MessageValue: ToTokens + Sized {
    const MESSAGE_IDENT: &'static str;
    const MESSAGE_ARG_WRAPPER: &'static str;

    // Required methods
    fn as_arg(&self) -> Option<usize>;
    fn new_string(s: String) -> Self;
    fn new_placeholder_raw(s: &str) -> Result<Self, MessageValueError>;
}

Required Associated Constants§

Source

const MESSAGE_IDENT: &'static str

Source

const MESSAGE_ARG_WRAPPER: &'static str

Required Methods§

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§

Source§

impl MessageValue for AllocMessageValue

Source§

const MESSAGE_IDENT: &'static str = "AllocMessage"

Source§

const MESSAGE_ARG_WRAPPER: &'static str = "vec!"

Source§

impl MessageValue for StaticMessageValue

Source§

const MESSAGE_IDENT: &'static str = "StaticMessage"

Source§

const MESSAGE_ARG_WRAPPER: &'static str = "&"