[][src]Trait gluon_vm::api::Userdata

pub trait Userdata: Any + Traverseable + Debug + Send + Sync {
    fn deep_clone(
        &self,
        deep_cloner: &mut Cloner
    ) -> Result<GcPtr<Box<dyn Userdata>>> { ... } }

Provided methods

fn deep_clone(
    &self,
    deep_cloner: &mut Cloner
) -> Result<GcPtr<Box<dyn Userdata>>>

Loading content...

Methods

impl dyn Userdata

pub fn is<T: Userdata>(&self) -> bool

Returns true if the boxed type is the same as T

pub fn downcast_ref<T: Userdata>(&self) -> Option<&T>

Returns some reference to the boxed value if it is of type T, or None if it isn't.

pub unsafe fn downcast_ref_unchecked<T: Userdata>(&self) -> &T

Returns a reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

pub fn downcast_mut<T: Userdata>(&mut self) -> Option<&mut T>

Returns some mutable reference to the boxed value if it is of type T, or None if it isn't.

pub unsafe fn downcast_mut_unchecked<T: Userdata>(&mut self) -> &mut T

Returns a mutable reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

impl dyn Userdata

pub fn downcast<T: Userdata>(self: Box<Self>) -> Result<Box<T>, Box<Self>>

Returns the boxed value if it is of type T, or Err(Self) if it isn't.

pub unsafe fn downcast_unchecked<T: Userdata>(self: Box<Self>) -> Box<T>

Returns the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

Trait Implementations

impl PartialEq<dyn Userdata + 'static> for dyn Userdata[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

Implementors

impl Userdata for DirEntry[src]

fn deep_clone(
    &self,
    deep_cloner: &mut Cloner
) -> Result<GcPtr<Box<dyn Userdata>>>
[src]

impl Userdata for Metadata[src]

fn deep_clone(
    &self,
    deep_cloner: &mut Cloner
) -> Result<GcPtr<Box<dyn Userdata>>>
[src]

impl Userdata for Thread[src]

fn deep_clone(
    &self,
    deep_cloner: &mut Cloner
) -> Result<GcPtr<Box<dyn Userdata>>>
[src]

impl<T> Userdata for Receiver<T> where
    T: Any + Send + Sync + Debug
[src]

fn deep_clone(
    &self,
    deep_cloner: &mut Cloner
) -> Result<GcPtr<Box<dyn Userdata>>>
[src]

impl<T> Userdata for Sender<T> where
    T: Any + Send + Sync + Debug
[src]

fn deep_clone(
    &self,
    deep_cloner: &mut Cloner
) -> Result<GcPtr<Box<dyn Userdata>>>
[src]

impl<T> Userdata for Lazy<T> where
    T: Any + Send + Sync
[src]

impl<T> Userdata for Reference<T> where
    T: Any + Send + Sync
[src]

Loading content...