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>where T1: ConstInstantiable, T2: ConstInstantiable,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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§