pub struct ClmLoader;Expand description
Serde-based chapter and component loader for CLM manifests.
Implementations§
Source§impl ClmLoader
impl ClmLoader
Sourcepub fn load_from_str(content: &str) -> Result<ParsedClmAst, String>
pub fn load_from_str(content: &str) -> Result<ParsedClmAst, String>
Parses a raw YAML or JSON string into a strongly-typed ParsedClmAst.
Sourcepub fn load_from_file<P: AsRef<Path>>(path: P) -> Result<ParsedClmAst, String>
pub fn load_from_file<P: AsRef<Path>>(path: P) -> Result<ParsedClmAst, String>
Loads and parses a CLM manifest file from the filesystem.
Sourcepub fn load_chapter_dir<P: AsRef<Path>>(
dir_path: P,
) -> Result<Vec<ParsedClmAst>, String>
pub fn load_chapter_dir<P: AsRef<Path>>( dir_path: P, ) -> Result<Vec<ParsedClmAst>, String>
Loads all YAML manifests within a given chapter directory.
Sourcepub fn from_value(raw_value: Value) -> Result<ParsedClmAst, String>
pub fn from_value(raw_value: Value) -> Result<ParsedClmAst, String>
Constructs a ParsedClmAst from a raw JSON Value tree.
Auto Trait Implementations§
impl Forget for ClmLoader
impl Freeze for ClmLoader
impl RefUnwindSafe for ClmLoader
impl Send for ClmLoader
impl Sync for ClmLoader
impl Unpin for ClmLoader
impl UnsafeUnpin for ClmLoader
impl UnwindSafe for ClmLoader
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