Skip to main content

AttachableSubject

Trait AttachableSubject 

Source
pub trait AttachableSubject<O>: Subject
where O: Observer,
{ // Required method fn attach(&mut self, attach_observer: O); }
Expand description

Allows Observers to be added to the implementing Subject.

Required Methods§

Source

fn attach(&mut self, attach_observer: O)

Adds the Observer to the list of elements notified when the Subject is notified.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§