pub struct Tie { /* private fields */ }Expand description
A tie joining a note to its neighbours: music21’s tie.Tie.
A tie on the first of two notes is enough to say they sound as one; the
matching Stop on the second is what a MusicXML writer needs, not what
the music needs.
Implementations§
Source§impl Tie
impl Tie
Sourcepub fn new(tie_type: TieType) -> Self
pub fn new(tie_type: TieType) -> Self
A tie of the given type, drawn normally, with no placement of its own.
Sourcepub fn from_name(name: &str) -> Result<Self>
pub fn from_name(name: &str) -> Result<Self>
Reads a tie from music21’s type name, "start" through
"continue-let-ring".
Sourcepub fn set_tie_type(&mut self, tie_type: TieType)
pub fn set_tie_type(&mut self, tie_type: TieType)
Replaces the tie type.
Sourcepub fn placement(&self) -> Option<Placement>
pub fn placement(&self) -> Option<Placement>
Which side of the note the tie sits on, when it was said.
Sourcepub fn set_placement(&mut self, placement: Option<Placement>)
pub fn set_placement(&mut self, placement: Option<Placement>)
Sets which side of the note the tie sits on.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tie
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Tie
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Tie
impl StructuralPartialEq for Tie
Auto Trait Implementations§
impl Freeze for Tie
impl RefUnwindSafe for Tie
impl Send for Tie
impl Sync for Tie
impl Unpin for Tie
impl UnsafeUnpin for Tie
impl UnwindSafe for Tie
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more