DefinedClass

Trait DefinedClass 

Source
pub trait DefinedClass: ClassType {
    type Ivars: Sized;

    // Provided method
    fn ivars(&self) -> &Self::Ivars
       where Self: Sized { ... }
}
Expand description

Marks class types whose implementation is defined in Rust.

This is used in define_class!, and allows access to the instance variables that a given type declares, see that macro for details.

Required Associated Types§

Source

type Ivars: Sized

A type representing the instance variables that this class carries.

Provided Methods§

Source

fn ivars(&self) -> &Self::Ivars
where Self: Sized,

Get a reference to the instance variable data that this object carries.

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§