pub struct Part(/* private fields */);
Expand description
Wraps another element, indicating that notes rendered from the wrapped element are to be played by a single instrument at a time.
Implementations§
Source§impl Part
impl Part
Sourcepub fn instrument(wrapped_element: impl Element) -> Part
pub fn instrument(wrapped_element: impl Element) -> Part
Creates a new instrument part from the given element.
Sourcepub fn percussion(wrapped_element: impl Element) -> Part
pub fn percussion(wrapped_element: impl Element) -> Part
Creates a new percussion part from the given element.
Sourcepub fn wrapped_element(&self) -> Option<&dyn Element>
pub fn wrapped_element(&self) -> Option<&dyn Element>
Returns the wrapped element.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Part
impl !RefUnwindSafe for Part
impl !Send for Part
impl !Sync for Part
impl Unpin for Part
impl !UnwindSafe for Part
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more