Skip to main content

I18nStringBuilderExt

Trait I18nStringBuilderExt 

Source
pub trait I18nStringBuilderExt {
    // Required methods
    fn display<D: Display + ?Sized>(display: &D) -> Self;
    fn debug<D: Debug + ?Sized>(debug: &D) -> Self;
    fn template_display<D: Display + ?Sized>(display: &D) -> Self;
    fn template_debug<D: Debug + ?Sized>(debug: &D) -> Self;
}
Expand description

Extension trait for I18nString to build it from other types.

Required Methods§

Source

fn display<D: Display + ?Sized>(display: &D) -> Self

Create a new I18nString::Literal from a Display type.

Source

fn debug<D: Debug + ?Sized>(debug: &D) -> Self

Create a new I18nString::Literal from a Debug type.

Source

fn template_display<D: Display + ?Sized>(display: &D) -> Self

Create a new I18nString::Template from a Display type.

Source

fn template_debug<D: Debug + ?Sized>(debug: &D) -> Self

Create a new I18nString::Template from a Debug type.

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§