rune::runtime

Trait TypeOf

Source
pub trait TypeOf: TypeHash {
    const STATIC_TYPE_INFO: AnyTypeInfo;
    const PARAMETERS: Hash = Hash::EMPTY;

    // Provided method
    fn type_info() -> TypeInfo { ... }
}
Expand description

Trait used for Rust types for which we can determine the runtime type of.

Required Associated Constants§

Source

const STATIC_TYPE_INFO: AnyTypeInfo

Access diagnostical type information for the current type.

This can be easily converted to a TypeInfo struct which provides human-readable diagnostics that has a reasonable Display and Debug implementation for humans.

See Self::type_info().

Provided Associated Constants§

Source

const PARAMETERS: Hash = Hash::EMPTY

Type parameters for the type.

See ParametersBuilder for more information.

Provided Methods§

Source

fn type_info() -> TypeInfo

Get type info associated with the current 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 TypeOf for Ordering

Source§

impl TypeOf for bool

Source§

impl TypeOf for char

Source§

impl TypeOf for f32

Source§

impl TypeOf for f64

Source§

impl TypeOf for i8

Source§

impl TypeOf for i16

Source§

impl TypeOf for i32

Source§

impl TypeOf for i64

Source§

impl TypeOf for i128

Source§

impl TypeOf for isize

Source§

impl TypeOf for str

Source§

impl TypeOf for u8

Source§

impl TypeOf for u16

Source§

impl TypeOf for u32

Source§

impl TypeOf for u64

Source§

impl TypeOf for u128

Source§

impl TypeOf for ()

Source§

impl TypeOf for usize

Source§

impl TypeOf for Error

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for String

Available on crate feature alloc only.
Source§

impl TypeOf for ParseCharError

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Error

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for ParseFloatError

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for ParseIntError

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Utf8Error

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Error

Available on crate feature std only.
Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for [u8]

Source§

impl TypeOf for [Value]

Source§

impl<A> TypeOf for (A,)
where A: MaybeTypeOf,

Source§

impl<A, B> TypeOf for (A, B)
where A: MaybeTypeOf, B: MaybeTypeOf,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> TypeOf 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> TypeOf 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> TypeOf 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> TypeOf 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> TypeOf 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> TypeOf for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)

Source§

impl<C, B> TypeOf for ControlFlow<C, B>
where C: MaybeTypeOf, B: MaybeTypeOf,

Source§

impl<T> TypeOf for Option<T>
where T: MaybeTypeOf,

Source§

impl<T> TypeOf for &T
where T: ?Sized + TypeOf,

Blanket implementation for references.

Source§

const PARAMETERS: Hash = T::PARAMETERS

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = T::STATIC_TYPE_INFO

Source§

impl<T> TypeOf for &mut T
where T: ?Sized + TypeOf,

Blanket implementation for mutable references.

Source§

const PARAMETERS: Hash = T::PARAMETERS

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = T::STATIC_TYPE_INFO

Source§

impl<T> TypeOf for Vec<T>
where T: MaybeTypeOf,

Available on crate feature alloc only.
Source§

impl<T> TypeOf for HashMap<String, T>
where T: MaybeTypeOf,

Available on crate feature std only.
Source§

impl<T> TypeOf for HashMap<String, T>
where T: MaybeTypeOf,

Available on crate feature std only.
Source§

impl<T, E> TypeOf for Result<T, E>
where T: MaybeTypeOf, E: MaybeTypeOf,

Implementors§

Source§

impl TypeOf for rune::runtime::ControlFlow

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for GeneratorState

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for FromUtf8Error

Available on crate feature alloc only.
Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Box<str>

Source§

impl TypeOf for rune::alloc::String

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Bencher

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Format

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Bytes

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Formatter

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Function

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Future

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Generator<Vm>

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Hasher

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Object

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for OwnedTuple

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Range

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for RangeFrom

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for RangeFull

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for RangeInclusive

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for RangeTo

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as crate::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for RangeToInclusive

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Stream<Vm>

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl TypeOf for Tuple

Source§

impl TypeOf for Type

Source§

impl TypeOf for rune::runtime::Vec

Source§

const PARAMETERS: Hash = _

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = <Self as rune::Any>::ANY_TYPE_INFO

Source§

impl<T> TypeOf for rune::alloc::HashMap<String, T>
where T: MaybeTypeOf,

Source§

impl<T> TypeOf for rune::alloc::HashMap<String, T>
where T: MaybeTypeOf,

Source§

impl<T> TypeOf for rune::alloc::Vec<T>
where T: MaybeTypeOf,

Source§

impl<T> TypeOf for Mut<T>
where T: ?Sized + TypeOf,

Blanket implementation for owned mutable references.

Source§

const PARAMETERS: Hash = T::PARAMETERS

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = T::STATIC_TYPE_INFO

Source§

impl<T> TypeOf for Ref<T>
where T: ?Sized + TypeOf,

Blanket implementation for owned references.

Source§

const PARAMETERS: Hash = T::PARAMETERS

Source§

const STATIC_TYPE_INFO: AnyTypeInfo = T::STATIC_TYPE_INFO

Source§

impl<T> TypeOf for VecTuple<T>
where T: MaybeTypeOf,