Skip to main content

ToStatic

Trait ToStatic 

Source
pub trait ToStatic {
    type Owned: 'static;

    // Required method
    fn to_static(&self) -> Self::Owned;
}
Available on crate feature mtls only.
Expand description

Common trait for objects that can be transformed to a 'static version of self

Required Associated Types§

Source

type Owned: 'static

Required Methods§

Source

fn to_static(&self) -> Self::Owned

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToStatic for Cow<'_, [u8]>

Source§

type Owned = Cow<'static, [u8]>

Source§

fn to_static(&self) -> <Cow<'_, [u8]> as ToStatic>::Owned

Source§

impl ToStatic for Cow<'_, str>

Source§

type Owned = Cow<'static, str>

Source§

fn to_static(&self) -> <Cow<'_, str> as ToStatic>::Owned

Source§

impl ToStatic for bool

Source§

impl ToStatic for i8

Source§

impl ToStatic for i16

Source§

impl ToStatic for i32

Source§

impl ToStatic for i64

Source§

impl ToStatic for i128

Source§

impl ToStatic for isize

Source§

impl ToStatic for str

Source§

impl ToStatic for u8

Source§

impl ToStatic for u16

Source§

impl ToStatic for u32

Source§

impl ToStatic for u64

Source§

impl ToStatic for u128

Source§

impl ToStatic for usize

Source§

impl<T> ToStatic for &T
where T: ToStatic,

Source§

type Owned = <T as ToStatic>::Owned

Source§

fn to_static(&self) -> <&T as ToStatic>::Owned

Implementors§

Source§

impl ToStatic for Header<'_>

Source§

type Owned = Header<'static>

Source§

impl ToStatic for Sequence<'_>

Source§

type Owned = Sequence<'static>

Source§

impl ToStatic for Set<'_>

Source§

type Owned = Set<'static>

Source§

impl ToStatic for String

Source§

impl<T, U> ToStatic for Vec<T>
where T: ToStatic<Owned = U>, U: 'static,

Source§

type Owned = Vec<U>

Source§

impl<T> ToStatic for Box<T>
where T: ToStatic,

Source§

impl<T> ToStatic for Option<T>
where T: ToStatic,