pub enum RichQuery<'a> {
Text(&'a str),
Pattern(&'a dyn Fn(&str) -> bool),
Function(&'a dyn Fn(&RichValue<'_>) -> bool),
Integer(IntegerType),
Sharps(IntegerType),
}Expand description
What a RichMetadata::search asks of a value: music21’s query, which
may be a string, a pattern, a function or a number.
Variants§
Text(&'a str)
Text held in a value’s text, either case ignored.
Pattern(&'a dyn Fn(&str) -> bool)
A pattern, answered for a value’s text: music21’s regular expression, which never matches what is not text.
Function(&'a dyn Fn(&RichValue<'_>) -> bool)
A function of any value: music21’s callable query.
Integer(IntegerType)
A number: held in a text as written, or equal to a count.
Sharps(IntegerType)
A key signature: equal to a count of sharps.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RichQuery<'a>
impl<'a> !Send for RichQuery<'a>
impl<'a> !Sync for RichQuery<'a>
impl<'a> !UnwindSafe for RichQuery<'a>
impl<'a> Forget for RichQuery<'a>
impl<'a> Freeze for RichQuery<'a>
impl<'a> Move for RichQuery<'a>
impl<'a> Unpin for RichQuery<'a>
impl<'a> UnsafeUnpin for RichQuery<'a>
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> 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