i_slint_core::translations

Trait FormatArgs

Source
pub trait FormatArgs {
    type Output<'a>: Display
       where Self: 'a;

    // Required method
    fn from_index(&self, index: usize) -> Option<Self::Output<'_>>;

    // Provided method
    fn from_name(&self, _name: &str) -> Option<Self::Output<'_>> { ... }
}

Required Associated Types§

Source

type Output<'a>: Display where Self: 'a

Required Methods§

Source

fn from_index(&self, index: usize) -> Option<Self::Output<'_>>

Provided Methods§

Source

fn from_name(&self, _name: &str) -> Option<Self::Output<'_>>

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.

Implementations on Foreign Types§

Source§

impl<T: Display> FormatArgs for [T]

Source§

type Output<'a> = &'a T where T: 'a

Source§

fn from_index(&self, index: usize) -> Option<&T>

Source§

impl<const N: usize, T: Display> FormatArgs for [T; N]

Source§

type Output<'a> = &'a T where T: 'a

Source§

fn from_index(&self, index: usize) -> Option<&T>

Implementors§