Skip to main content

CheckedAnyRef

Trait CheckedAnyRef 

Source
pub trait CheckedAnyRef {
    // Required methods
    fn checked_i31(&self, store: impl AsContext) -> Result<I31>;
    fn checked_struct(&self, store: impl AsContext) -> Result<Rooted<StructRef>>;
    fn checked_array(&self, store: impl AsContext) -> Result<Rooted<ArrayRef>>;
}

Required Methods§

Source

fn checked_i31(&self, store: impl AsContext) -> Result<I31>

§Errors

Fails when the reference is unrooted or is not an i31.

Source

fn checked_struct(&self, store: impl AsContext) -> Result<Rooted<StructRef>>

§Errors

Fails when the reference is unrooted or is not a struct.

Source

fn checked_array(&self, store: impl AsContext) -> Result<Rooted<ArrayRef>>

§Errors

Fails when the reference is unrooted or is not an array.

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.

Implementations on Foreign Types§

Source§

impl CheckedAnyRef for Rooted<AnyRef>

Source§

fn checked_i31(&self, store: impl AsContext) -> Result<I31>

Source§

fn checked_struct(&self, store: impl AsContext) -> Result<Rooted<StructRef>>

Source§

fn checked_array(&self, store: impl AsContext) -> Result<Rooted<ArrayRef>>

Implementors§