Trait IntoStatic

Source
pub trait IntoStatic {
    type Static: 'static;

    // Required method
    fn into_static(self) -> Self::Static;
}
Expand description

Upgrading to 'static lifetimes.

Required Associated Types§

Source

type Static: 'static

The type with 'static lifetimes.

Required Methods§

Source

fn into_static(self) -> Self::Static

Upgrades Self to Self::Static.

Implementations on Foreign Types§

Source§

impl<T: ToOwned + ?Sized + 'static> IntoStatic for Cow<'_, T>

Available on crate features std or alloc only.
Source§

type Static = Cow<'static, T>

Source§

fn into_static(self) -> Self::Static

Source§

impl<T: IntoStatic> IntoStatic for Option<T>

Source§

impl<T: IntoStatic, E: IntoStatic> IntoStatic for Result<T, E>

Implementors§