pub trait MusicObject:
Send
+ Sync
+ Any {
// Required methods
fn kind(&self) -> &'static str;
fn duration(&self) -> Time;
fn voices<'a>(&'a self, offset: Time, out: &mut Vec<TimedAtom<'a>>);
fn clone_box(&self) -> Box<dyn MusicObject>;
fn as_any(&self) -> &dyn Any;
}Expand description
Required Methods§
Sourcefn voices<'a>(&'a self, offset: Time, out: &mut Vec<TimedAtom<'a>>)
fn voices<'a>(&'a self, offset: Time, out: &mut Vec<TimedAtom<'a>>)
Appends the timed atoms produced by this object, shifted by offset.
Sourcefn clone_box(&self) -> Box<dyn MusicObject>
fn clone_box(&self) -> Box<dyn MusicObject>
Clones this object into a fresh boxed trait object.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".