Skip to main content

AssociateClass

Trait AssociateClass 

Source
pub trait AssociateClass {
    // Required method
    fn associate_class(&mut self, class: InterfaceClass) -> bool;
}
Expand description

An object that can be associate with an InterfaceClass.

Required Methods§

Source

fn associate_class(&mut self, class: InterfaceClass) -> bool

Check if this object is a valid object for the given interface class I.

Returns Some(self) if this is a valid instance of the interface, and None otherwise.

Classes constructed by InterfaceClass are unique per type, so repeatedly calling this method for the same InterfaceClass is allowed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§