pub struct Set {
pub method: String,
pub cards: HashMap<Uuid, Card>,
pub run_state: Option<String>,
pub test_in_progress: bool,
}
Expand description
A set of cards with associated data about how learning this set has progressed.
Fields§
§method: String
The name of the method used on this set. As methods provide their own custom metadata for each card, it is not generally possible to transition a set from one learning method to another while keeping your progress, unless a transformer is provided by the methods to do so. This acts as a guard to prevent the user from accidentally deleting all their hard work!
cards: HashMap<Uuid, Card>
A list of all the cards in the set.
run_state: Option<String>
The state of the set in terms of tests. This will be Some(..)
if there was a previous
test, and the attached string will be the name of the method used. Runs on different targets
will not interfere with each other, and this program is built to support them.
test_in_progress: bool
Whether or not there is a test currently in progress. Card weightings are calculated with an internal system in tests, but no internal card metadata will be modified, this is instead used to keep track of which cards have already been shown to the user.
Note that, if a test is started on one target, and a later test is begun on a different subset target,
it is possible that the latter will cause the prior to be forgotten about (since this will be set back
to false
once the active test is finished). This kind of issue does not affect learn mode, because there
is no such thing as a finished learn mode, until all weightings are set to zero, meaning things are kept
track of on a card-by-card basis, unlike in tests.
Implementations§
source§impl Set
impl Set
sourcepub fn list(&self, ty: CardType) -> Vec<SlimCard>
pub fn list(&self, ty: CardType) -> Vec<SlimCard>
Lists all the terms in the set of the given type, returning them as pairs of questions and answers.
Note: it is deliberately impossible to return card metadata through the traditional interface, and one should independently process that if this is required. The generical philosophy of Forne is not to interact with the method-specific metadata whenever possible, however.