Trait HasStaticType

Source
pub trait HasStaticType {
    // Required method
    fn type_info() -> &'static Type;
}
Expand description

A trait that defines static type information for types that can provide it.

Required Methods§

Source

fn type_info() -> &'static 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 HasStaticType for c_void

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for bool

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for f32

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for f64

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for i8

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for i16

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for i32

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for i64

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for i128

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for isize

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for u8

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for u16

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for u32

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for u64

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for u128

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for ()

Source§

fn type_info() -> &'static Type

Source§

impl HasStaticType for usize

Source§

fn type_info() -> &'static Type

Source§

impl<T> HasStaticType for *const T
where T: HasStaticType + 'static,

Every type that has at least a type name also has a valid pointer type name

Source§

fn type_info() -> &'static Type

Source§

impl<T> HasStaticType for *mut T
where T: HasStaticType + 'static,

Every type that has at least a type name also has a valid pointer type name

Source§

fn type_info() -> &'static Type

Implementors§