Trait objc2::DeclaredClass

source ·
pub trait DeclaredClass: ClassType {
    type Ivars: Sized;

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

Marks types whose implementation is defined in Rust.

This is used in declare_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.

source

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

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

Object Safety§

This trait is not object safe.

Implementors§