Trait Staticize

Source
pub trait Staticize {
    type Static: 'static + ?Sized;

    // Provided methods
    fn static_type_id() -> TypeId { ... }
    fn static_type_name() -> &'static str { ... }
}
Expand description

Provides a handy Static associated type which should resolve to a 'static version of T for all T that implement Staticize.

Required Associated Types§

Source

type Static: 'static + ?Sized

A 'static version of T.

Provided Methods§

Source

fn static_type_id() -> TypeId

Returns the TypeId of the 'static version of T

Source

fn static_type_name() -> &'static str

Returns the type name of the 'static version of T

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 Staticize for Ordering

Source§

impl Staticize for bool

Source§

impl Staticize for char

Source§

impl Staticize for f32

Source§

impl Staticize for f64

Source§

impl Staticize for i8

Source§

impl Staticize for i16

Source§

impl Staticize for i32

Source§

impl Staticize for i64

Source§

impl Staticize for i128

Source§

impl Staticize for isize

Source§

impl Staticize for str

Source§

impl Staticize for u8

Source§

impl Staticize for u16

Source§

impl Staticize for u32

Source§

impl Staticize for u64

Source§

impl Staticize for u128

Source§

impl Staticize for ()

Source§

impl Staticize for usize

Source§

impl Staticize for AtomicBool

Source§

impl Staticize for AtomicI8

Source§

impl Staticize for AtomicI16

Source§

impl Staticize for AtomicI32

Source§

impl Staticize for AtomicI64

Source§

impl Staticize for AtomicIsize

Source§

impl Staticize for AtomicU8

Source§

impl Staticize for AtomicU16

Source§

impl Staticize for AtomicU32

Source§

impl Staticize for AtomicU64

Source§

impl Staticize for AtomicUsize

Source§

impl<'a, T> Staticize for &'a T
where T: Staticize + ?Sized,

Source§

type Static = &'static <T as Staticize>::Static

Source§

impl<'a, T: Staticize> Staticize for &'a [T]
where <T as Staticize>::Static: Sized,

Source§

type Static = &'static [<T as Staticize>::Static]

Source§

impl<A: Staticize> Staticize for (A,)
where <A as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static,)

Source§

impl<A: Staticize, B: Staticize> Staticize for (A, B)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize> Staticize for (A, B, C)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize> Staticize for (A, B, C, D)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize> Staticize for (A, B, C, D, E)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize> Staticize for (A, B, C, D, E, F)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize, G: Staticize> Staticize for (A, B, C, D, E, F, G)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized, <G as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize, G: Staticize, H: Staticize> Staticize for (A, B, C, D, E, F, G, H)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized, <G as Staticize>::Static: Sized, <H as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static, <H as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize, G: Staticize, H: Staticize, I: Staticize> Staticize for (A, B, C, D, E, F, G, H, I)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized, <G as Staticize>::Static: Sized, <H as Staticize>::Static: Sized, <I as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static, <H as Staticize>::Static, <I as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize, G: Staticize, H: Staticize, I: Staticize, J: Staticize> Staticize for (A, B, C, D, E, F, G, H, I, J)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized, <G as Staticize>::Static: Sized, <H as Staticize>::Static: Sized, <I as Staticize>::Static: Sized, <J as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static, <H as Staticize>::Static, <I as Staticize>::Static, <J as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize, G: Staticize, H: Staticize, I: Staticize, J: Staticize, K: Staticize> Staticize for (A, B, C, D, E, F, G, H, I, J, K)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized, <G as Staticize>::Static: Sized, <H as Staticize>::Static: Sized, <I as Staticize>::Static: Sized, <J as Staticize>::Static: Sized, <K as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static, <H as Staticize>::Static, <I as Staticize>::Static, <J as Staticize>::Static, <K as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize, G: Staticize, H: Staticize, I: Staticize, J: Staticize, K: Staticize, L: Staticize> Staticize for (A, B, C, D, E, F, G, H, I, J, K, L)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized, <G as Staticize>::Static: Sized, <H as Staticize>::Static: Sized, <I as Staticize>::Static: Sized, <J as Staticize>::Static: Sized, <K as Staticize>::Static: Sized, <L as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static, <H as Staticize>::Static, <I as Staticize>::Static, <J as Staticize>::Static, <K as Staticize>::Static, <L as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize, G: Staticize, H: Staticize, I: Staticize, J: Staticize, K: Staticize, L: Staticize, M: Staticize> Staticize for (A, B, C, D, E, F, G, H, I, J, K, L, M)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized, <G as Staticize>::Static: Sized, <H as Staticize>::Static: Sized, <I as Staticize>::Static: Sized, <J as Staticize>::Static: Sized, <K as Staticize>::Static: Sized, <L as Staticize>::Static: Sized, <M as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static, <H as Staticize>::Static, <I as Staticize>::Static, <J as Staticize>::Static, <K as Staticize>::Static, <L as Staticize>::Static, <M as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize, G: Staticize, H: Staticize, I: Staticize, J: Staticize, K: Staticize, L: Staticize, M: Staticize, N: Staticize> Staticize for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized, <G as Staticize>::Static: Sized, <H as Staticize>::Static: Sized, <I as Staticize>::Static: Sized, <J as Staticize>::Static: Sized, <K as Staticize>::Static: Sized, <L as Staticize>::Static: Sized, <M as Staticize>::Static: Sized, <N as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static, <H as Staticize>::Static, <I as Staticize>::Static, <J as Staticize>::Static, <K as Staticize>::Static, <L as Staticize>::Static, <M as Staticize>::Static, <N as Staticize>::Static)

Source§

impl<A: Staticize, B: Staticize, C: Staticize, D: Staticize, E: Staticize, F: Staticize, G: Staticize, H: Staticize, I: Staticize, J: Staticize, K: Staticize, L: Staticize, M: Staticize, N: Staticize, O: Staticize> Staticize for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
where <A as Staticize>::Static: Sized, <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized, <D as Staticize>::Static: Sized, <E as Staticize>::Static: Sized, <F as Staticize>::Static: Sized, <G as Staticize>::Static: Sized, <H as Staticize>::Static: Sized, <I as Staticize>::Static: Sized, <J as Staticize>::Static: Sized, <K as Staticize>::Static: Sized, <L as Staticize>::Static: Sized, <M as Staticize>::Static: Sized, <N as Staticize>::Static: Sized, <O as Staticize>::Static: Sized,

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static, <H as Staticize>::Static, <I as Staticize>::Static, <J as Staticize>::Static, <K as Staticize>::Static, <L as Staticize>::Static, <M as Staticize>::Static, <N as Staticize>::Static, <O as Staticize>::Static)

Source§

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

Source§

type Static = (<A as Staticize>::Static, <B as Staticize>::Static, <C as Staticize>::Static, <D as Staticize>::Static, <E as Staticize>::Static, <F as Staticize>::Static, <G as Staticize>::Static, <H as Staticize>::Static, <I as Staticize>::Static, <J as Staticize>::Static, <K as Staticize>::Static, <L as Staticize>::Static, <M as Staticize>::Static, <N as Staticize>::Static, <O as Staticize>::Static, <P as Staticize>::Static)

Source§

impl<B: Staticize, C: Staticize> Staticize for ControlFlow<B, C>
where <B as Staticize>::Static: Sized, <C as Staticize>::Static: Sized,

Source§

impl<T: Staticize> Staticize for Bound<T>
where <T as Staticize>::Static: Sized,

Source§

impl<T: Staticize> Staticize for Option<T>
where <T as Staticize>::Static: Sized,

Source§

impl<T: Staticize, E: Staticize> Staticize for Result<T, E>
where <T as Staticize>::Static: Sized, <E as Staticize>::Static: Sized,

Implementors§