pub struct TutorialSystem {
pub tutorials: Vec<Tutorial>,
pub learning_paths: Vec<LearningPath>,
pub progress_tracker: ProgressTracker,
pub assessment_engine: AssessmentEngine,
pub config: TutorialConfig,
}Fields§
§tutorials: Vec<Tutorial>§learning_paths: Vec<LearningPath>§progress_tracker: ProgressTracker§assessment_engine: AssessmentEngine§config: TutorialConfigImplementations§
Source§impl TutorialSystem
impl TutorialSystem
pub fn new(config: TutorialConfig) -> TutorialSystem
pub fn add_tutorial(&mut self, tutorial: Tutorial)
pub fn create_learning_path(&mut self, path: LearningPath)
pub fn generate_tutorial_from_trait(&self, trait_info: &TraitInfo) -> Tutorial
pub fn generate_tutorial_from_type(&self, type_info: &TypeInfo) -> Tutorial
pub fn get_recommended_tutorials(&self, user_id: &str) -> Vec<&Tutorial>
pub fn start_tutorial( &mut self, user_id: String, tutorial_id: String, ) -> Result<(), String>
pub fn complete_section( &mut self, user_id: &str, tutorial_id: &str, _section_id: &str, ) -> Result<(), String>
pub fn get_user_progress(&self, user_id: &str) -> Option<&UserProgress>
pub fn update_global_statistics(&mut self)
Trait Implementations§
Source§impl Clone for TutorialSystem
impl Clone for TutorialSystem
Source§fn clone(&self) -> TutorialSystem
fn clone(&self) -> TutorialSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TutorialSystem
impl Debug for TutorialSystem
Source§impl<'de> Deserialize<'de> for TutorialSystem
impl<'de> Deserialize<'de> for TutorialSystem
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TutorialSystem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TutorialSystem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TutorialSystem
impl Serialize for TutorialSystem
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for TutorialSystem
impl RefUnwindSafe for TutorialSystem
impl Send for TutorialSystem
impl Sync for TutorialSystem
impl Unpin for TutorialSystem
impl UnwindSafe for TutorialSystem
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> 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>
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