pub unsafe trait ProvidesStaticType<'a> {
    type StaticType: 'static + ?Sized;
}
Expand description

Provides access to the same type as Self but with all lifetimes dropped to 'static (including lifetimes of parameters).

This type is usually implemented with #[derive(ProvidesStaticType)].

Required Associated Types§

source

type StaticType: 'static + ?Sized

Same type as Self but with lifetimes dropped to 'static.

The trait is unsafe because if this is implemented incorrectly, the program might not work correctly.

Implementations on Foreign Types§

source§

impl<'a> ProvidesStaticType<'a> for bool

source§

impl<'a> ProvidesStaticType<'a> for f32

source§

impl<'a> ProvidesStaticType<'a> for f64

source§

impl<'a> ProvidesStaticType<'a> for i8

source§

impl<'a> ProvidesStaticType<'a> for i16

source§

impl<'a> ProvidesStaticType<'a> for i32

source§

impl<'a> ProvidesStaticType<'a> for i64

source§

impl<'a> ProvidesStaticType<'a> for i128

source§

impl<'a> ProvidesStaticType<'a> for isize

source§

impl<'a> ProvidesStaticType<'a> for str

source§

impl<'a> ProvidesStaticType<'a> for u8

source§

impl<'a> ProvidesStaticType<'a> for u16

source§

impl<'a> ProvidesStaticType<'a> for u32

source§

impl<'a> ProvidesStaticType<'a> for u64

source§

impl<'a> ProvidesStaticType<'a> for u128

source§

impl<'a> ProvidesStaticType<'a> for ()

source§

impl<'a> ProvidesStaticType<'a> for usize

source§

impl<'a> ProvidesStaticType<'a> for String

source§

impl<'a, K, V> ProvidesStaticType<'a> for BTreeMap<K, V>

source§

impl<'a, K, V> ProvidesStaticType<'a> for HashMap<K, V>

source§

impl<'a, T> ProvidesStaticType<'a> for Option<T>

source§

impl<'a, T> ProvidesStaticType<'a> for [T]

source§

impl<'a, T> ProvidesStaticType<'a> for Vec<T>

source§

impl<'a, T, E> ProvidesStaticType<'a> for Result<T, E>

source§

impl<'a, T: ProvidesStaticType<'a> + ?Sized> ProvidesStaticType<'a> for *const T

source§

impl<'a, T: ProvidesStaticType<'a> + ?Sized> ProvidesStaticType<'a> for *mut T

source§

impl<'a, T: ProvidesStaticType<'a> + ?Sized> ProvidesStaticType<'a> for &'a T

§

type StaticType = &'static <T as ProvidesStaticType<'a>>::StaticType

source§

impl<'a, T: ProvidesStaticType<'a> + ?Sized> ProvidesStaticType<'a> for &'a mut T

§

type StaticType = &'static mut <T as ProvidesStaticType<'a>>::StaticType

source§

impl<'a, T: ProvidesStaticType<'a> + ?Sized> ProvidesStaticType<'a> for Box<T>

source§

impl<'a, T: ProvidesStaticType<'a> + ?Sized> ProvidesStaticType<'a> for Rc<T>

source§

impl<'a, T: ProvidesStaticType<'a> + ?Sized> ProvidesStaticType<'a> for Arc<T>

source§

impl<'a, T: ProvidesStaticType<'a>> ProvidesStaticType<'a> for Cell<T>

source§

impl<'a, T: ProvidesStaticType<'a>> ProvidesStaticType<'a> for RefCell<T>

source§

impl<'a, T: ProvidesStaticType<'a>> ProvidesStaticType<'a> for UnsafeCell<T>

Implementors§

source§

impl<'pst> ProvidesStaticType<'pst> for FrozenExportedName

source§

impl<'pst> ProvidesStaticType<'pst> for MutableExportedName

source§

impl<'pst> ProvidesStaticType<'pst> for StarlarkFloat

source§

impl<'pst> ProvidesStaticType<'pst> for NativeFunction

source§

impl<'pst> ProvidesStaticType<'pst> for NoneType

source§

impl<'pst> ProvidesStaticType<'pst> for Range

source§

impl<'pst> ProvidesStaticType<'pst> for StarlarkStr

source§

impl<'pst> ProvidesStaticType<'pst> for FrozenValue

source§

impl<'pst, T> ProvidesStaticType<'pst> for StarlarkAny<T>
where T: Debug + Display + Send + Sync + 'static + Sized,

source§

impl<'pst, V: ProvidesStaticType<'pst> + Sized> ProvidesStaticType<'pst> for TypeCompiled<V>
where V::StaticType: Sized,

source§

impl<'v> ProvidesStaticType<'v> for Dict<'v>

§

type StaticType = Dict<'static>

source§

impl<'v> ProvidesStaticType<'v> for Value<'v>

§

type StaticType = Value<'static>

source§

impl<'v, T: StarlarkValue<'v> + ProvidesStaticType<'v> + Sized> ProvidesStaticType<'v> for FrozenValueTyped<'v, T>
where T::StaticType: StarlarkValue<'static> + Sized,

source§

impl<'v, T: StarlarkValue<'v> + ProvidesStaticType<'v> + Sized> ProvidesStaticType<'v> for ValueTyped<'v, T>
where T::StaticType: StarlarkValue<'static> + Sized,