pub enum Algorithm {
Wildcard,
Rhythm,
NoteName,
Custom(fn(&StreamElement, &SearchTerm) -> Option<bool>),
}Expand description
How a StreamSearcher compares an element of the stream with the
search term it is lined up with: each answers that they match, that
they do not, or nothing, leaving it to the next.
Variants§
Wildcard
A wildcard matches anything: music21’s wildcardAlgorithm.
Rhythm
A term of any length matches; one of another length does not:
music21’s rhythmAlgorithm.
NoteName
A term or element with no name, or of another name, does not match:
music21’s noteNameAlgorithm.
Custom(fn(&StreamElement, &SearchTerm) -> Option<bool>)
A comparison of one’s own.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnsafeUnpin for Algorithm
impl UnwindSafe for Algorithm
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,
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