Trait bounded_static::ToBoundedStatic
source · 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§
Required Methods§
Implementations on Foreign Types§
source§impl<T> ToBoundedStatic for LinkedList<T>where
T: ToBoundedStatic,
impl<T> ToBoundedStatic for LinkedList<T>where T: ToBoundedStatic,
Blanket ToBoundedStatic
impl for converting LinkedList<T>
into LinkedList<T>: 'static
.
type Static = LinkedList<<T as ToBoundedStatic>::Static, Global>
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for bool
impl ToBoundedStatic for bool
No-op ToBoundedStatic
impl for this primitive type.
source§impl<T5: ToBoundedStatic, T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T5, T4, T3, T2, T1, T0)
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
type Static = (<T5 as ToBoundedStatic>::Static, <T4 as ToBoundedStatic>::Static, <T3 as ToBoundedStatic>::Static, <T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for NonZeroI128
impl ToBoundedStatic for NonZeroI128
No-op ToBoundedStatic
impl for this primitive type.
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)
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
type Static = (<T10 as ToBoundedStatic>::Static, <T9 as ToBoundedStatic>::Static, <T8 as ToBoundedStatic>::Static, <T7 as ToBoundedStatic>::Static, <T6 as ToBoundedStatic>::Static, <T5 as ToBoundedStatic>::Static, <T4 as ToBoundedStatic>::Static, <T3 as ToBoundedStatic>::Static, <T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for NonZeroI16
impl ToBoundedStatic for NonZeroI16
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for NonZeroI8
impl ToBoundedStatic for NonZeroI8
No-op ToBoundedStatic
impl for this primitive type.
source§impl<T, const N: usize> ToBoundedStatic for [T; N]where
T: ToBoundedStatic + Copy,
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
.
source§impl ToBoundedStatic for SmolStr
impl ToBoundedStatic for SmolStr
ToBoundedStatic
impl for smol_str::SmolStr
.
source§impl ToBoundedStatic for f64
impl ToBoundedStatic for f64
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for i128
impl ToBoundedStatic for i128
No-op ToBoundedStatic
impl for this primitive type.
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)
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
type Static = (<T9 as ToBoundedStatic>::Static, <T8 as ToBoundedStatic>::Static, <T7 as ToBoundedStatic>::Static, <T6 as ToBoundedStatic>::Static, <T5 as ToBoundedStatic>::Static, <T4 as ToBoundedStatic>::Static, <T3 as ToBoundedStatic>::Static, <T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for String
impl ToBoundedStatic for String
ToBoundedStatic
impl for String
.
source§impl<T> ToBoundedStatic for Vec<T>where
T: ToBoundedStatic,
impl<T> ToBoundedStatic for Vec<T>where T: ToBoundedStatic,
Blanket ToBoundedStatic
impl for converting Vec<T>
to Vec<T>: 'static
.
source§impl<T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T1, T0)
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)
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for isize
impl ToBoundedStatic for isize
No-op ToBoundedStatic
impl for this primitive type.
source§impl<T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T4, T3, T2, T1, T0)
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
type Static = (<T4 as ToBoundedStatic>::Static, <T3 as ToBoundedStatic>::Static, <T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)
fn to_static(&self) -> Self::Static
source§impl<T, S: BuildHasher> ToBoundedStatic for HashSet<T, S>where
T: ToBoundedStatic,
T::Static: Eq + Hash,
impl<T, S: BuildHasher> ToBoundedStatic for HashSet<T, S>where T: ToBoundedStatic, T::Static: Eq + Hash,
Blanket ToBoundedStatic
impl for converting HashSet<T>
into HashSet<T>: 'static
.
type Static = HashSet<<T as ToBoundedStatic>::Static, RandomState>
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for char
impl ToBoundedStatic for char
No-op ToBoundedStatic
impl for this primitive type.
source§impl<T> ToBoundedStatic for Cow<'_, T>where
T: 'static + ToOwned + ?Sized,
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>
.
source§impl<T0: ToBoundedStatic> ToBoundedStatic for (T0,)
impl<T0: ToBoundedStatic> ToBoundedStatic for (T0,)
Blanket ToBoundedStatic
impl for converting tuple (T0,)
to (T0,): 'static
source§impl ToBoundedStatic for f32
impl ToBoundedStatic for f32
No-op ToBoundedStatic
impl for this primitive type.
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)
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
type Static = (<T11 as ToBoundedStatic>::Static, <T10 as ToBoundedStatic>::Static, <T9 as ToBoundedStatic>::Static, <T8 as ToBoundedStatic>::Static, <T7 as ToBoundedStatic>::Static, <T6 as ToBoundedStatic>::Static, <T5 as ToBoundedStatic>::Static, <T4 as ToBoundedStatic>::Static, <T3 as ToBoundedStatic>::Static, <T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)
fn to_static(&self) -> Self::Static
source§impl<T, E> ToBoundedStatic for Result<T, E>where
T: ToBoundedStatic,
E: ToBoundedStatic,
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> ToBoundedStatic for Box<T>where
T: ToBoundedStatic,
impl<T> ToBoundedStatic for Box<T>where T: ToBoundedStatic,
Blanket ToBoundedStatic
impl for converting Box<T>
to Box<T>: 'static
.
source§impl ToBoundedStatic for &'static str
impl ToBoundedStatic for &'static str
No-op ToBoundedStatic
impl for converting &'static str
to &'static str
.
source§impl ToBoundedStatic for u64
impl ToBoundedStatic for u64
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for u16
impl ToBoundedStatic for u16
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for u8
impl ToBoundedStatic for u8
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for i8
impl ToBoundedStatic for i8
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for u32
impl ToBoundedStatic for u32
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for usize
impl ToBoundedStatic for usize
No-op ToBoundedStatic
impl for this primitive type.
source§impl<K, V, S: BuildHasher> ToBoundedStatic for HashMap<K, V, S>where
K: ToBoundedStatic,
K::Static: Eq + Hash,
V: ToBoundedStatic,
impl<K, V, S: BuildHasher> ToBoundedStatic for HashMap<K, V, S>where K: ToBoundedStatic, K::Static: Eq + Hash, V: ToBoundedStatic,
Blanket ToBoundedStatic
impl for converting HashMap<K, V>
to HashMap<K, V>: 'static
.
type Static = HashMap<<K as ToBoundedStatic>::Static, <V as ToBoundedStatic>::Static, RandomState>
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for u128
impl ToBoundedStatic for u128
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for i64
impl ToBoundedStatic for i64
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for ()
impl ToBoundedStatic for ()
No-op ToBoundedStatic
impl for unit type ()
.
source§impl<T> ToBoundedStatic for BTreeSet<T>where
T: ToBoundedStatic,
T::Static: Ord,
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<T6: ToBoundedStatic, T5: ToBoundedStatic, T4: ToBoundedStatic, T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T6, T5, T4, T3, T2, T1, T0)
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
type Static = (<T6 as ToBoundedStatic>::Static, <T5 as ToBoundedStatic>::Static, <T4 as ToBoundedStatic>::Static, <T3 as ToBoundedStatic>::Static, <T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for NonZeroU8
impl ToBoundedStatic for NonZeroU8
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for NonZeroI32
impl ToBoundedStatic for NonZeroI32
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for NonZeroU64
impl ToBoundedStatic for NonZeroU64
No-op ToBoundedStatic
impl for this primitive type.
source§impl<Mode> ToBoundedStatic for SmartString<Mode>where
Mode: SmartStringMode + 'static,
impl<Mode> ToBoundedStatic for SmartString<Mode>where Mode: SmartStringMode + 'static,
ToBoundedStatic
impl for smartstring::SmartString
.
source§impl ToBoundedStatic for NonZeroI64
impl ToBoundedStatic for NonZeroI64
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for i16
impl ToBoundedStatic for i16
No-op ToBoundedStatic
impl for this primitive type.
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)
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
type Static = (<T7 as ToBoundedStatic>::Static, <T6 as ToBoundedStatic>::Static, <T5 as ToBoundedStatic>::Static, <T4 as ToBoundedStatic>::Static, <T3 as ToBoundedStatic>::Static, <T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)
fn to_static(&self) -> Self::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)
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
type Static = (<T8 as ToBoundedStatic>::Static, <T7 as ToBoundedStatic>::Static, <T6 as ToBoundedStatic>::Static, <T5 as ToBoundedStatic>::Static, <T4 as ToBoundedStatic>::Static, <T3 as ToBoundedStatic>::Static, <T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)
fn to_static(&self) -> Self::Static
source§impl<T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T2, T1, T0)
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)
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for NonZeroUsize
impl ToBoundedStatic for NonZeroUsize
No-op ToBoundedStatic
impl for this primitive type.
source§impl<K, V> ToBoundedStatic for BTreeMap<K, V>where
K: ToBoundedStatic,
K::Static: Ord,
V: ToBoundedStatic,
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<T3: ToBoundedStatic, T2: ToBoundedStatic, T1: ToBoundedStatic, T0: ToBoundedStatic> ToBoundedStatic for (T3, T2, T1, T0)
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
type Static = (<T3 as ToBoundedStatic>::Static, <T2 as ToBoundedStatic>::Static, <T1 as ToBoundedStatic>::Static, <T0 as ToBoundedStatic>::Static)
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for NonZeroU32
impl ToBoundedStatic for NonZeroU32
No-op ToBoundedStatic
impl for this primitive type.
source§impl<T> ToBoundedStatic for Option<T>where
T: ToBoundedStatic,
impl<T> ToBoundedStatic for Option<T>where T: ToBoundedStatic,
Blanket ToBoundedStatic
impl for converting Option<T>
to Option<T>: 'static
.
source§impl<T> ToBoundedStatic for VecDeque<T>where
T: ToBoundedStatic,
impl<T> ToBoundedStatic for VecDeque<T>where T: ToBoundedStatic,
Blanket ToBoundedStatic
impl for converting VecDeque<T>
into VecDeque<T>: 'static
.
source§impl<A> ToBoundedStatic for SmallVec<A>where
A: Array + 'static,
A::Item: Clone,
impl<A> ToBoundedStatic for SmallVec<A>where A: Array + 'static, A::Item: Clone,
ToBoundedStatic
impl for smallvec::SmallVec
.
source§impl ToBoundedStatic for i32
impl ToBoundedStatic for i32
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for NonZeroU16
impl ToBoundedStatic for NonZeroU16
No-op ToBoundedStatic
impl for this primitive type.
source§impl<T> ToBoundedStatic for BinaryHeap<T>where
T: ToBoundedStatic,
T::Static: Ord,
impl<T> ToBoundedStatic for BinaryHeap<T>where T: ToBoundedStatic, T::Static: Ord,
Blanket ToBoundedStatic
impl for converting BinaryHeap<T>
into BinaryHeap<T>: 'static
.
type Static = BinaryHeap<<T as ToBoundedStatic>::Static>
fn to_static(&self) -> Self::Static
source§impl ToBoundedStatic for NonZeroIsize
impl ToBoundedStatic for NonZeroIsize
No-op ToBoundedStatic
impl for this primitive type.
source§impl ToBoundedStatic for NonZeroU128
impl ToBoundedStatic for NonZeroU128
No-op ToBoundedStatic
impl for this primitive type.