pub struct TomlFile { /* private fields */ }Expand description
The specification for a set of compositions which Monument should search. The TomlFile type is
parsed directly from the TOML, and can be thought of as an AST representation of the TOML
file. Like ASTs, this specifies a superset of valid programs - so building a composition
search can also fail (as can lowering an AST).
Implementations§
Source§impl TomlFile
impl TomlFile
Sourcepub fn new(toml_path: &Path) -> Result<Self>
pub fn new(toml_path: &Path) -> Result<Self>
Load and parse a TomlFile structure from a TOML file
Sourcepub fn to_params(
&self,
toml_path: &Path,
) -> Result<(Parameters, Vec<MusicDisplay>)>
pub fn to_params( &self, toml_path: &Path, ) -> Result<(Parameters, Vec<MusicDisplay>)>
Build a set of Parameters from this TomlFile
pub fn should_print_atw(&self) -> bool
pub fn config(&self, opts: &Options, leak_search_memory: bool) -> Config
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TomlFile
impl<'de> Deserialize<'de> for TomlFile
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
Auto Trait Implementations§
impl Freeze for TomlFile
impl RefUnwindSafe for TomlFile
impl Send for TomlFile
impl Sync for TomlFile
impl Unpin for TomlFile
impl UnwindSafe for TomlFile
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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