Trait ToStatic

Source
pub trait ToStatic: Sealed {
    type Static<'a>
       where 'a: 'static;

    // Required method
    fn to_static(&self) -> Self::Static<'static>;
}
Expand description

Helper trait to detach objects with lifetimes attached to a compiler or context.

Required Associated Types§

Source

type Static<'a> where 'a: 'static

The static type to return.

Required Methods§

Source

fn to_static(&self) -> Self::Static<'static>

Clone the object into an instance with 'static lifetime.

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.

Implementors§

Source§

impl ToStatic for DecorationValue<'_>

Source§

type Static<'a> = DecorationValue<'static> where 'a: 'static

Source§

impl ToStatic for AllResources<'_>

Source§

type Static<'a> = AllResources<'static> where 'a: 'static

Source§

impl ToStatic for BuiltinResource<'_>

Source§

type Static<'a> = BuiltinResource<'static> where 'a: 'static

Source§

impl ToStatic for Resource<'_>

Source§

type Static<'a> = Resource<'static> where 'a: 'static