pub enum KeySource<'a> {
Path {
path: &'a Path,
corpus: Option<&'a Path>,
},
Text(&'a str),
}Expand description
How a path was given to corpus_path_to_key: music21 reads a
pathlib.Path by its parts and a string by its text.
Variants§
Path
A path, and the corpus directory it is read relative to where it lies inside it.
Fields
Text(&'a str)
A string.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for KeySource<'a>
impl<'a> Freeze for KeySource<'a>
impl<'a> Move for KeySource<'a>
impl<'a> RefUnwindSafe for KeySource<'a>
impl<'a> Send for KeySource<'a>
impl<'a> Sync for KeySource<'a>
impl<'a> Unpin for KeySource<'a>
impl<'a> UnsafeUnpin for KeySource<'a>
impl<'a> UnwindSafe for KeySource<'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> 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