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§