Trait ConstInstantiable

Source
pub trait ConstInstantiable {
    // Required method
    fn fmt_const_new(&self, f: &mut Formatter<'_>) -> Result;
}
Expand description

Provides a way to generate code which instantiates values of the implementing type in a const context.

Required Methods§

Source

fn fmt_const_new(&self, f: &mut Formatter<'_>) -> Result

Print a const expression that can be used to instantiate this value.

Implementations on Foreign Types§

Source§

impl<T1, T2> ConstInstantiable for Result<T1, T2>

Source§

fn fmt_const_new(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<T1, T2> ConstInstantiable for (T1, T2)

Source§

fn fmt_const_new(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<T1, T2, T3> ConstInstantiable for (T1, T2, T3)

Source§

fn fmt_const_new(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<T1, T2, T3, T4> ConstInstantiable for (T1, T2, T3, T4)

Source§

fn fmt_const_new(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<T: ConstInstantiable> ConstInstantiable for Option<T>

Source§

fn fmt_const_new(&self, f: &mut Formatter<'_>) -> Result

Implementors§