pub struct LoadedSpec {
pub spec: SweepSpec,
pub spec_source: SpecSource,
pub execution: ExecutionTable,
}Expand description
A spec file read whole: the spec, the text it was read from, and its execution settings.
Fields§
§spec: SweepSpecSweep spec the file describes.
spec_source: SpecSourcePath, text and design tables of the file, as a manifest records them.
execution: ExecutionTableThe file’s [execution] table, for SweepOptions::apply_execution to apply.
Implementations§
Source§impl LoadedSpec
impl LoadedSpec
Sourcepub fn read(path: &Path) -> Result<Self, SpecFileError>
pub fn read(path: &Path) -> Result<Self, SpecFileError>
Reads the file at path, reading a table design’s file relative to it.
§Errors
Returns the errors of SpecFile::load and SpecFile::into_spec.
Sourcepub fn parse(text: &str) -> Result<Self, SpecFileError>
pub fn parse(text: &str) -> Result<Self, SpecFileError>
Reads spec text that refers to no table file.
§Errors
Returns the errors of SpecFile::parse and SpecFile::into_spec. A block that refers to a table file is
rejected, since no file is read. A table design given inline as table_text is read.
Sourcepub fn to_toml(&self) -> Result<String, SpecFileError>
pub fn to_toml(&self) -> Result<String, SpecFileError>
Writes the spec and its execution table as spec-file text, as the app’s Save spec does.
A table design’s rows are written inline, as a manifest records them.
§Errors
Returns SpecFileError::Write when the spec cannot be written as TOML.
Trait Implementations§
Source§impl Clone for LoadedSpec
impl Clone for LoadedSpec
Auto Trait Implementations§
impl Freeze for LoadedSpec
impl RefUnwindSafe for LoadedSpec
impl Send for LoadedSpec
impl Sync for LoadedSpec
impl Unpin for LoadedSpec
impl UnsafeUnpin for LoadedSpec
impl UnwindSafe for LoadedSpec
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
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> ⓘ
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> ⓘ
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