1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ix!();

use crate::ProcessRingout;

#[enum_dispatch]
pub trait Effect : 
Debug 
+ Init 
+ ProcessRingout 
+ GetReturnLevel
+ Update
+ Suspend { }

pub type MaybeEffect = Option<Box<dyn Effect>>;
pub type MaybeEffects = Vec<MaybeEffect>;

#[enum_dispatch]
pub trait Init {
    fn init(&mut self) {}
}

#[enum_dispatch]
pub trait Update {
    fn update(&mut self) { }
}

#[enum_dispatch]
pub trait Suspend: Init {
    fn suspend(&mut self) { self.init() }
}

#[enum_dispatch]
pub trait Reset {
    fn reset(&mut self);
}

#[enum_dispatch]
pub trait ClearBuffers {
    fn clear_buffers(&mut self);
}

#[enum_dispatch]
pub trait GetReturnLevel {
    fn returnlevel(&self) -> f32;
}