[][src]Struct supermemo2::Item

pub struct Item { /* fields omitted */ }

A struct that holds the essential metadata for an item using the supermemo2 algorithm.

Methods

impl Item[src]

pub fn new() -> Self[src]

Return an Item with no reviews and the default E-factor of 2.5.

pub fn from(repetitions: usize, efactor: f64) -> Self[src]

Create an Item that has already been reviewed by specifying the number of repetitions done and the current E-factor.

pub fn interval(&self) -> usize[src]

Returns the current interval of the card. The interval is defined as the time in days since the previous review after which this item will be due for review.

pub fn answer(&self, quality: &Quality) -> Self[src]

Returns a new Item for an answer to this Item with the provided Quality.

pub fn answer_mut(&mut self, quality: &Quality)[src]

Updates an Item for an answer with the provided Quality.

Trait Implementations

impl Display for Item[src]

Auto Trait Implementations

impl Send for Item

impl Sync for Item

impl Unpin for Item

impl UnwindSafe for Item

impl RefUnwindSafe for Item

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]