pub trait ToBoundedStatic {
    type Static: 'static;

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

A trait for converting &T to an owned T such that T: 'static.

See the module level documentation for details.

Required Associated Types§

source

type Static: 'static

The target type is bounded by the 'static lifetime.

Required Methods§

source

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

Convert an &T to an owned T such that T: 'static.

Implementations on Foreign Types§

source§

impl ToBoundedStatic for &'static str

No-op ToBoundedStatic impl for converting &'static str to &'static str.

§

type Static = &'static str

source§

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

source§

impl ToBoundedStatic for bool

No-op ToBoundedStatic impl for this primitive type.

§

type Static = bool

source§

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

source§

impl ToBoundedStatic for char

No-op ToBoundedStatic impl for this primitive type.

§

type Static = char

source§

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

source§

impl ToBoundedStatic for f32

No-op ToBoundedStatic impl for this primitive type.

§

type Static = f32

source§

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

source§

impl ToBoundedStatic for f64

No-op ToBoundedStatic impl for this primitive type.

§

type Static = f64

source§

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

source§

impl ToBoundedStatic for i8

No-op ToBoundedStatic impl for this primitive type.

§

type Static = i8

source§

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

source§

impl ToBoundedStatic for i16

No-op ToBoundedStatic impl for this primitive type.

§

type Static = i16

source§

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

source§

impl ToBoundedStatic for i32

No-op ToBoundedStatic impl for this primitive type.

§

type Static = i32

source§

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

source§

impl ToBoundedStatic for i64

No-op ToBoundedStatic impl for this primitive type.

§

type Static = i64

source§

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

source§

impl ToBoundedStatic for i128

No-op ToBoundedStatic impl for this primitive type.

§

type Static = i128

source§

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

source§

impl ToBoundedStatic for isize

No-op ToBoundedStatic impl for this primitive type.

§

type Static = isize

source§

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

source§

impl ToBoundedStatic for u8

No-op ToBoundedStatic impl for this primitive type.

§

type Static = u8

source§

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

source§

impl ToBoundedStatic for u16

No-op ToBoundedStatic impl for this primitive type.

§

type Static = u16

source§

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

source§

impl ToBoundedStatic for u32

No-op ToBoundedStatic impl for this primitive type.

§

type Static = u32

source§

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

source§

impl ToBoundedStatic for u64

No-op ToBoundedStatic impl for this primitive type.

§

type Static = u64

source§

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

source§

impl ToBoundedStatic for u128

No-op ToBoundedStatic impl for this primitive type.

§

type Static = u128

source§

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

source§

impl ToBoundedStatic for ()

No-op ToBoundedStatic impl for unit type ().

§

type Static = ()

source§

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

source§

impl ToBoundedStatic for usize

No-op ToBoundedStatic impl for this primitive type.

§

type Static = usize

source§

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

source§

impl ToBoundedStatic for String

ToBoundedStatic impl for String.

§

type Static = String

source§

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

source§

impl ToBoundedStatic for NonZeroI8

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroI8

source§

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

source§

impl ToBoundedStatic for NonZeroI16

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroI16

source§

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

source§

impl ToBoundedStatic for NonZeroI32

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroI32

source§

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

source§

impl ToBoundedStatic for NonZeroI64

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroI64

source§

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

source§

impl ToBoundedStatic for NonZeroI128

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroI128

source§

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

source§

impl ToBoundedStatic for NonZeroIsize

No-op ToBoundedStatic impl for this primitive type.

source§

impl ToBoundedStatic for NonZeroU8

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroU8

source§

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

source§

impl ToBoundedStatic for NonZeroU16

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroU16

source§

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

source§

impl ToBoundedStatic for NonZeroU32

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroU32

source§

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

source§

impl ToBoundedStatic for NonZeroU64

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroU64

source§

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

source§

impl ToBoundedStatic for NonZeroU128

No-op ToBoundedStatic impl for this primitive type.

§

type Static = NonZeroU128

source§

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

source§

impl ToBoundedStatic for NonZeroUsize

No-op ToBoundedStatic impl for this primitive type.

source§

impl ToBoundedStatic for RandomState

ToBoundedStatic impl for std::collections::hash_map::RandomState.

§

type Static = RandomState

source§

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

source§

impl ToBoundedStatic for RandomState

ToBoundedStatic impl for ahash::RandomState.

§

type Static = RandomState

source§

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

source§

impl ToBoundedStatic for SmolStr

ToBoundedStatic impl for smol_str::SmolStr.

§

type Static = SmolStr

source§

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

source§

impl<A> ToBoundedStatic for SmallVec<A>where A: Array + 'static, A::Item: Clone,

ToBoundedStatic impl for smallvec::SmallVec.

§

type Static = SmallVec<A>

source§

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

source§

impl<K, V> ToBoundedStatic for BTreeMap<K, V>where K: ToBoundedStatic, K::Static: Ord, V: ToBoundedStatic,

Blanket ToBoundedStatic impl for converting BTreeMap<K, V> into BTreeMap<K, V>: 'static.

source§

impl<K, V, S> ToBoundedStatic for HashMap<K, V, S>where K: ToBoundedStatic, K::Static: Eq + Hash, V: ToBoundedStatic, S: ToBoundedStatic, S::Static: BuildHasher,

Blanket ToBoundedStatic impl for converting HashMap<K, V> to HashMap<K, V>: 'static.

source§

impl<K, V, S> ToBoundedStatic for AHashMap<K, V, S>where K: ToBoundedStatic, K::Static: Eq + Hash, V: ToBoundedStatic, S: ToBoundedStatic, S::Static: BuildHasher,

Blanket ToBoundedStatic impl for converting ahash::AHashMap<K, V, S> to ahash::AHashMap<K, V, S>: 'static.

source§

impl<Mode> ToBoundedStatic for SmartString<Mode>where Mode: SmartStringMode + 'static,

ToBoundedStatic impl for smartstring::SmartString.

§

type Static = SmartString<Mode>

source§

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

source§

impl<T0: ToBoundedStatic> ToBoundedStatic for (T0,)

Blanket ToBoundedStatic impl for converting tuple (T0,) to (T0,): 'static

§

type Static = (<T0 as ToBoundedStatic>::Static,)

source§

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

source§

impl<T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T1, T0,) to (T1, T0,): 'static

§

type Static = (<T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)

source§

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

source§

impl<T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T2, T1, T0,) to (T2, T1, T0,): 'static

§

type Static = (<T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)

source§

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

source§

impl<T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T3, T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T3, T2, T1, T0,) to (T3, T2, T1, T0,): 'static

source§

impl<T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T4, T3, T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T4, T3, T2, T1, T0,) to (T4, T3, T2, T1, T0,): 'static

source§

impl<T5: ToBoundedStatic, T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T5, T4, T3, T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T5, T4, T3, T2, T1, T0,) to (T5, T4, T3, T2, T1, T0,): 'static

source§

impl<T6: ToBoundedStatic, T5: ToBoundedStatic, T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T6, T5, T4, T3, T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T6, T5, T4, T3, T2, T1, T0,) to (T6, T5, T4, T3, T2, T1, T0,): 'static

source§

impl<T7: ToBoundedStatic, T6: ToBoundedStatic, T5: ToBoundedStatic, T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T7, T6, T5, T4, T3, T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T7, T6, T5, T4, T3, T2, T1, T0,) to (T7, T6, T5, T4, T3, T2, T1, T0,): 'static

source§

impl<T8: ToBoundedStatic, T7: ToBoundedStatic, T6: ToBoundedStatic, T5: ToBoundedStatic, T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T8, T7, T6, T5, T4, T3, T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T8, T7, T6, T5, T4, T3, T2, T1, T0,) to (T8, T7, T6, T5, T4, T3, T2, T1, T0,): 'static

source§

impl<T9: ToBoundedStatic, T8: ToBoundedStatic, T7: ToBoundedStatic, T6: ToBoundedStatic, T5: ToBoundedStatic, T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T9, T8, T7, T6, T5, T4, T3, T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T9, T8, T7, T6, T5, T4, T3, T2, T1, T0,) to (T9, T8, T7, T6, T5, T4, T3, T2, T1, T0,): 'static

source§

impl<T10: ToBoundedStatic, T9: ToBoundedStatic, T8: ToBoundedStatic, T7: ToBoundedStatic, T6: ToBoundedStatic, T5: ToBoundedStatic, T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0,) to (T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0,): 'static

source§

impl<T11: ToBoundedStatic, T10: ToBoundedStatic, T9: ToBoundedStatic, T8: ToBoundedStatic, T7: ToBoundedStatic, T6: ToBoundedStatic, T5: ToBoundedStatic, T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T11, T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0)

Blanket ToBoundedStatic impl for converting tuple (T11, T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0,) to (T11, T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0,): 'static

source§

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

Blanket ToBoundedStatic impl for converting Cow<'a, T: ?Sized> to Cow<'static, T: ?Sized>.

§

type Static = Cow<'static, T>

source§

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

source§

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

Blanket ToBoundedStatic impl for converting Option<T> to Option<T>: 'static.

§

type Static = Option<<T as ToBoundedStatic>::Static>

source§

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

source§

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

Blanket ToBoundedStatic impl for converting Box<T> to Box<T>: 'static.

§

type Static = Box<<T as ToBoundedStatic>::Static>

source§

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

source§

impl<T> ToBoundedStatic for BinaryHeap<T>where T: ToBoundedStatic, T::Static: Ord,

Blanket ToBoundedStatic impl for converting BinaryHeap<T> into BinaryHeap<T>: 'static.

source§

impl<T> ToBoundedStatic for BTreeSet<T>where T: ToBoundedStatic, T::Static: Ord,

Blanket ToBoundedStatic impl for converting BTreeSet<T> into BTreeSet<T>: 'static.

source§

impl<T> ToBoundedStatic for LinkedList<T>where T: ToBoundedStatic,

Blanket ToBoundedStatic impl for converting LinkedList<T> into LinkedList<T>: 'static.

source§

impl<T> ToBoundedStatic for VecDeque<T>where T: ToBoundedStatic,

Blanket ToBoundedStatic impl for converting VecDeque<T> into VecDeque<T>: 'static.

source§

impl<T> ToBoundedStatic for Vec<T>where T: ToBoundedStatic,

Blanket ToBoundedStatic impl for converting Vec<T> to Vec<T>: 'static.

§

type Static = Vec<<T as ToBoundedStatic>::Static>

source§

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

source§

impl<T, E> ToBoundedStatic for Result<T, E>where T: ToBoundedStatic, E: ToBoundedStatic,

Blanket ToBoundedStatic impl for converting Result<T, E> to Result<T, E>: 'static.

source§

impl<T, S> ToBoundedStatic for HashSet<T, S>where T: ToBoundedStatic, T::Static: Eq + Hash, S: ToBoundedStatic, S::Static: BuildHasher,

Blanket ToBoundedStatic impl for converting HashSet<T> into HashSet<T>: 'static.

source§

impl<T, S> ToBoundedStatic for AHashSet<T, S>where T: ToBoundedStatic, T::Static: Eq + Hash, S: ToBoundedStatic, S::Static: BuildHasher,

Blanket ToBoundedStatic impl for converting ahash::AHashSet<T, S> to ahash::AHashSet<T, S>: 'static.

source§

impl<T, const N: usize> ToBoundedStatic for [T; N]where T: ToBoundedStatic + Copy,

Blanket ToBoundedStatic impl for converting [T; const N: usize] to [T; const N: usize]: 'static.

§

type Static = [<T as ToBoundedStatic>::Static; N]

source§

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

Implementors§