[−][src]Struct supermemo2::Item
A struct that holds the essential metadata for an item using the supermemo2 algorithm.
Methods
impl Item
[src]
pub fn new(repetitions: usize, efactor: f64) -> Self
[src]
Return an Item
with the given number of repetitions and E-factor.
pub fn repetitions(&self) -> usize
[src]
Get the number of repetitions of this Item
.
pub fn efactor(&self) -> f64
[src]
Get the E-factor of this Item
.
pub fn interval(&self) -> usize
[src]
Returns the current interval of the Item
.
The interval is defined as the time in days since the previous review after which
this Item
will be due for review.
pub fn review(&self, quality: u8) -> Result<Self, Error>
[src]
Returns a new Item
based on the given quality.
The quality can be an integer between 0 and 5.
If a quality above 5 is given, this will return an Err
.
- 0 - complete blackout.
- 1 - incorrect response; the correct one remembered
- 2 - incorrect response; where the correct one seemed easy to recall
- 3 - correct response recalled with serious difficulty
- 4 - correct response after a hesitation
- 5 - perfect response
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,