pub struct SpacedRepetition {
pub blocks: Vec<SpacedBlock>,
}Expand description
Spaced repetition állapot — az összes tracked blokk.
Fields§
§blocks: Vec<SpacedBlock>Implementations§
Source§impl SpacedRepetition
impl SpacedRepetition
Sourcepub fn load_or_init(output_dir: &Path) -> Self
pub fn load_or_init(output_dir: &Path) -> Self
Betöltés SPR1 file-ból, vagy üres init.
Sourcepub fn remap_indexes(&mut self, old_to_new: &[u32])
pub fn remap_indexes(&mut self, old_to_new: &[u32])
Remap block indices after a rebuild changed the block layout.
old_to_new[old_idx] = new_idx; entries that no longer exist
(u32::MAX) are dropped.
Sourcepub fn find(&self, block_idx: u32) -> Option<&SpacedBlock>
pub fn find(&self, block_idx: u32) -> Option<&SpacedBlock>
Keress egy blokkot block_idx alapján.
pub fn find_mut(&mut self, block_idx: u32) -> Option<&mut SpacedBlock>
Sourcepub fn record_recall(&mut self, block_idx: u32, importance: u8, quality: u8)
pub fn record_recall(&mut self, block_idx: u32, importance: u8, quality: u8)
Hozz létre vagy frissíts egy blokkot a recall után.
Sourcepub fn spacing_boost(&self, block_idx: u32) -> f32
pub fn spacing_boost(&self, block_idx: u32) -> f32
Spacing boost adott blokkhoz a recall scoring-hoz.
Sourcepub fn mastered_count(&self) -> usize
pub fn mastered_count(&self) -> usize
Hány “mastered” blokk (recall_count >= 15)?
Sourcepub fn stats(&self) -> SpacedStats
pub fn stats(&self) -> SpacedStats
Statisztikák.
Sourcepub fn due_blocks(&self) -> Vec<u32>
pub fn due_blocks(&self) -> Vec<u32>
Listázd a due blokkokat block_idx szerint.
Auto Trait Implementations§
impl Freeze for SpacedRepetition
impl RefUnwindSafe for SpacedRepetition
impl Send for SpacedRepetition
impl Sync for SpacedRepetition
impl Unpin for SpacedRepetition
impl UnsafeUnpin for SpacedRepetition
impl UnwindSafe for SpacedRepetition
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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