Struct trane::Trane

source ·
pub struct Trane { /* private fields */ }
Expand description

Trane is a library for the acquisition of highly hierarchical knowledge and skills based on the principles of mastery learning and spaced repetition. Given a list of courses, its lessons and corresponding exercises, Trane presents the student with a list of exercises based on the demonstrated mastery of previous exercises. It makes sure that new material and skills are not introduced until the prerequisite material and skills have been sufficiently mastered.

Implementations§

Creates a new instance of the library given the path to the root of a course library. The user data will be stored in a directory named .trane inside the library root directory.

Returns the path to the root of the course library.

Returns the number of mantras that have been recited by the mantra miner.

Trait Implementations§

Adds the given unit to the blacklist.
Removes the given unit from the blacklist. Do nothing if the unit is not already in the list. Read more
Returns whether the given unit is in the blacklist and should be skipped during scheduling.
Returns all the entries in the blacklist.
Returns the course manifest for the given course.
Returns the lesson manifest for the given lesson.
Returns the exercise manifest for the given exercise.
Returns the IDs of all courses in the library sorted alphabetically.
Returns the IDs of all lessons in the given course sorted alphabetically.
Returns the IDs of all exercises in the given lesson sorted alphabetically.
Returns the IDs of all the units which match the given query.
Gets a new batch of exercises scheduled for a new trial. Contains an optimal filter to restrict the units visited during the search with the purpose of allowing students to choose which material to practice. If the filter is not provided, the scheduler will search the entire graph. Read more
Records the score of the given exercise’s trial. The scores are used by the scheduler to decide when to stop traversing a path and how to sort and filter all the found candidates into a final batch. Read more
Removes any cached scores for the given unit. The score will be recomputed the next time the score is needed. Read more
Gets the filter with the given ID.
Returns a list of filter IDs and descriptions.
Retrieves the last num_scores scores of a particular exercise.
Records the score assigned to the exercise in a particular trial. Therefore, the score is a value of the MasteryScore enum instead of a float. Only units of type UnitType::Exercise should have scores recorded. However, the enforcement of this requirement is left to the caller. Read more
Deletes all the exercise trials except for the last num_scores with the aim of keeping the storage size under check. Read more
Adds the given unit to the review list.
Removes the given unit from the review list. Do nothing if the unit is not already in the list. Read more
Returns all the entries in the review list.
Adds a new course to the unit graph.
Adds a new lesson to the unit graph. This function is the equivalent of add_course for lessons. It also requires the ID of the course to which this lesson belongs. Read more
Adds a new exercise to the unit graph. This function is the equivalent of add_course and add_lesson for exercises. It also requires the ID of the lesson to which this exercise belongs. Read more
Takes a unit and its dependencies and updates the graph accordingly. Returns an error if unit_type is UnitType::Exercise as only courses and lessons are allowed to have dependencies. An error is also returned if the unit is not explicitly added by calling one of add_course or add_lesson. Read more
Returns the type of the given unit.
Returns the lessons belonging to the given course.
Returns the starting lessons for the given course.
Updates the starting lessons for all courses. The starting lessons of the course are those of its lessons that should be practiced first when the course is introduced to the student. The scheduler uses them to traverse through the other lessons in the course in the correct order. Read more
Returns the course to which the given lesson belongs.
Returns the exercises belonging to the given lesson.
Returns the lesson to which the given exercise belongs.
Returns the dependencies of the given unit.
Returns all the units which depend on the given unit.
Returns the dependency sinks of the graph. A dependency sink is a unit from which a walk of the entire unit graph needs to start. Because the lessons in a course implicitly depend on their course, properly initialized lessons do not belong to this set. Read more
Performs a cycle check on the graph, done currently when opening the Trane library to prevent any infinite traversal of the graph and immediately inform the user of the issue. Read more
Generates a DOT graph of the dependent graph. DOT files are used by Graphviz to visualize a graph, in this case the dependent graph. This operation was suggested in issue #13 in the trane-cli repo. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
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. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.