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 + 'static)>
pub fn wrapped_element(&self) -> Option<&(dyn Element + 'static)>
Returns the wrapped element.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Part
impl<'de> Deserialize<'de> for Part
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Part, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Part, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Element for Part
impl Element for Part
Source§fn wrapped_element(&self) -> Option<&(dyn Element + 'static)>
fn wrapped_element(&self) -> Option<&(dyn Element + 'static)>
Wrapped element.
Source§impl Serialize for Part
impl Serialize for Part
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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