ValueExt

Trait ValueExt 

Source
pub trait ValueExt<'gc> {
    // Required method
    fn as_static_user_data<T>(&self) -> Result<&'gc T, TypeError>
       where T: 'static;
}
Expand description

Extension trait on top of Value to add helper functions.

Required Methods§

Source

fn as_static_user_data<T>(&self) -> Result<&'gc T, TypeError>
where T: 'static,

Convert to a static user data type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'gc> ValueExt<'gc> for Value<'gc>