rune

Trait ToConstValue

Source
pub trait ToConstValue: Sized {
    // Required method
    fn to_const_value(self) -> Result<ConstValue, RuntimeError>;

    // Provided method
    fn construct() -> Option<Arc<dyn ConstConstruct>> { ... }
}
Expand description

Convert a value into a constant value.

Required Methods§

Source

fn to_const_value(self) -> Result<ConstValue, RuntimeError>

Convert into a constant value.

Provided Methods§

Source

fn construct() -> Option<Arc<dyn ConstConstruct>>

Return the constant constructor for the given type.

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 ToConstValue for &str

Source§

impl ToConstValue for &[u8]

Source§

impl ToConstValue for Ordering

Source§

impl ToConstValue for bool

Source§

impl ToConstValue for char

Source§

impl ToConstValue for f32

Source§

impl ToConstValue for f64

Source§

impl ToConstValue for i8

Source§

impl ToConstValue for i16

Source§

impl ToConstValue for i32

Source§

impl ToConstValue for i64

Source§

impl ToConstValue for i128

Source§

impl ToConstValue for isize

Source§

impl ToConstValue for u8

Source§

impl ToConstValue for u16

Source§

impl ToConstValue for u32

Source§

impl ToConstValue for u64

Source§

impl ToConstValue for u128

Source§

impl ToConstValue for usize

Source§

impl<A> ToConstValue for (A,)
where A: ToConstValue,

Source§

impl<A, B> ToConstValue for (A, B)

Source§

impl<A, B, C> ToConstValue for (A, B, C)

Source§

impl<A, B, C, D> ToConstValue for (A, B, C, D)

Source§

impl<A, B, C, D, E> ToConstValue for (A, B, C, D, E)

Source§

impl<A, B, C, D, E, F> ToConstValue for (A, B, C, D, E, F)

Source§

impl<A, B, C, D, E, F, G> ToConstValue for (A, B, C, D, E, F, G)

Source§

impl<A, B, C, D, E, F, G, H> ToConstValue for (A, B, C, D, E, F, G, H)

Source§

impl<A, B, C, D, E, F, G, H, I> ToConstValue for (A, B, C, D, E, F, G, H, I)

Source§

impl<A, B, C, D, E, F, G, H, I, J> ToConstValue for (A, B, C, D, E, F, G, H, I, J)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> ToConstValue for (A, B, C, D, E, F, G, H, I, J, K)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> ToConstValue for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> ToConstValue for (A, B, C, D, E, F, G, H, I, J, K, L, M)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> ToConstValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> ToConstValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> ToConstValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)

Implementors§