Struct trane::course_builder::LessonBuilder
source · pub struct LessonBuilder {
pub directory_name: String,
pub manifest_closure: Box<dyn Fn(LessonManifestBuilder) -> LessonManifestBuilder>,
pub exercise_manifest_template: ExerciseManifestBuilder,
pub exercise_builders: Vec<ExerciseBuilder>,
pub asset_builders: Vec<AssetBuilder>,
}Expand description
A builder that generates the files needed to add a lesson to a course.
Fields§
§directory_name: StringBase name of the directory on which to store this lesson.
manifest_closure: Box<dyn Fn(LessonManifestBuilder) -> LessonManifestBuilder>A closure taking a builder common to all lessons which returns the builder for a specific lesson manifest.
exercise_manifest_template: ExerciseManifestBuilderA template builder used to build the manifests for each exercise in the lesson. Common attributes to all exercises should be set here.
exercise_builders: Vec<ExerciseBuilder>A list of tuples of exercise directory name and exercise builder to create the exercises in the lesson.
asset_builders: Vec<AssetBuilder>A list of asset builders to create assets specific to this lesson.
Implementations§
source§impl LessonBuilder
impl LessonBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for LessonBuilder
impl !Send for LessonBuilder
impl !Sync for LessonBuilder
impl Unpin for LessonBuilder
impl !UnwindSafe for LessonBuilder
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.