mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-03-13 11:50:44 +01:00
closer and closer to testing it away
This commit is contained in:
parent
817d2a722c
commit
4aef21f60d
10 changed files with 1782 additions and 2028 deletions
|
|
@ -318,9 +318,14 @@ pub trait HasScenes: Has<Vec<Scene>> + Send + Sync {
|
|||
|
||||
/// ```
|
||||
/// use tek::{MidiEditor, HasEditor, tengri::Has};
|
||||
/// struct TestEditorHost(Option<MidiEditor>);
|
||||
/// tek::tengri::has!(Option<MidiEditor>: |self: TestEditorHost|self.0);
|
||||
///
|
||||
/// let mut host = TestEditorHost(Some(MidiEditor::default()));
|
||||
/// struct TestEditorHost(Option<MidiEditor>);
|
||||
/// impl Has<Option<MidiEditor>> for TestEditorHost {
|
||||
/// fn get (&self) -> &Option<MidiEditor> { &self.0 }
|
||||
/// fn get_mut (&mut self) -> &mut Option<MidiEditor> { &mut self.0 }
|
||||
/// }
|
||||
///
|
||||
/// let _ = host.editor();
|
||||
/// let _ = host.editor_mut();
|
||||
/// let _ = host.is_editing();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue