Skip to main content

Interpolatable

Trait Interpolatable 

Source
pub trait Interpolatable {
    // Required method
    fn as_part(&self) -> TextPart<'_>;
}
Expand description

Anything that can be interpolated into a text_interpolated.

So a caller writes the value and not the variant — and so crate::ltext! can accept whatever the format string was given.

Required Methods§

Source

fn as_part(&self) -> TextPart<'_>

This value as a part.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Interpolatable for String

Source§

fn as_part(&self) -> TextPart<'_>

Source§

impl Interpolatable for f64

Source§

fn as_part(&self) -> TextPart<'_>

Source§

impl Interpolatable for i32

Source§

fn as_part(&self) -> TextPart<'_>

Source§

impl Interpolatable for i64

Source§

fn as_part(&self) -> TextPart<'_>

Source§

impl Interpolatable for str

Source§

fn as_part(&self) -> TextPart<'_>

Source§

impl Interpolatable for usize

Source§

fn as_part(&self) -> TextPart<'_>

Source§

impl<T: Interpolatable + ?Sized> Interpolatable for &T

Source§

fn as_part(&self) -> TextPart<'_>

Implementors§