pub struct MuseScore { /* private fields */ }Available on crate feature
musescore and non-WebAssembly only.Expand description
A MuseScore installation.
use music21_rs::musescore::MuseScore;
use std::path::Path;
let musescore = MuseScore::find().expect("MuseScore is installed");
let score = musescore.read(Path::new("quartet.mscz"))?;
musescore.write(&score, Path::new("quartet.pdf"), &Default::default())?;Implementations§
Source§impl MuseScore
impl MuseScore
Sourcepub fn at(executable: impl Into<PathBuf>) -> Self
pub fn at(executable: impl Into<PathBuf>) -> Self
The installation whose executable is at this path.
Sourcepub fn find() -> Option<Self>
pub fn find() -> Option<Self>
Looks for MuseScore: at the path MUSESCORE_PATH names, then on
the search path, then where its installers put it.
Sourcepub fn executable(&self) -> &Path
pub fn executable(&self) -> &Path
Where the executable is.
Sourcepub fn convert(&self, input: &Path, output: &Path) -> Result<()>
pub fn convert(&self, input: &Path, output: &Path) -> Result<()>
Converts one file into another, each in the format its extension
names: mscore -o output input.
Trait Implementations§
impl Eq for MuseScore
impl StructuralPartialEq for MuseScore
Auto Trait Implementations§
impl Freeze for MuseScore
impl RefUnwindSafe for MuseScore
impl Send for MuseScore
impl Sync for MuseScore
impl Unpin for MuseScore
impl UnsafeUnpin for MuseScore
impl UnwindSafe for MuseScore
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