Struct Card

Source
pub struct Card { /* private fields */ }

Implementations§

Source§

impl Card

Source

pub fn trivial(&self) -> bool

Source

pub fn reviewable(&self) -> bool

Source

pub fn clone_base(&self) -> RawCard

Source

pub fn attributes_on_class(&self) -> Option<Vec<Attrv2>>

Source

pub fn attributes(&self) -> Option<Vec<Attrv2>>

Source

pub fn parent_classes(&self) -> HashSet<CardId>

Source

pub fn get_attr(&self, id: AttributeId) -> Option<Attrv2>

Source

pub fn attr_id(&self) -> Option<AttributeId>

Source

pub fn attribute_instance(&self) -> CardId

gets the instance that this attribute card is based on.

Source

pub fn uses_attr_id(&self, id: AttributeId) -> bool

Source

pub fn front_audio(&self) -> Option<&Audio>

Source

pub fn back_audio(&self) -> Option<&Audio>

Source

pub fn front_audio_id(&self) -> Option<AudioId>

Source

pub fn back_audio_id(&self) -> Option<AudioId>

Source

pub fn card_type(&self) -> CType

Source

pub fn dependents_ids(&self) -> BTreeSet<CardId>

Source

pub fn dependents(&self) -> BTreeSet<Arc<Self>>

Source

pub fn add_review(&mut self, recall: Recall)

Source

pub fn time_provider(&self) -> FsTime

Source

pub fn lapses_last_month(&self) -> u32

Source

pub fn lapses_last_week(&self) -> u32

Source

pub fn lapses_last_day(&self) -> u32

Source

pub fn from_parts( base: RawCard, history: History, metadata: Metadata, card_provider: CardProvider, recaller: SimpleRecall, front_audio: Option<Audio>, back_audio: Option<Audio>, ) -> Self

Source

pub fn namespace(&self) -> Option<CardId>

Source

pub fn is_finished(&self) -> bool

Source

pub fn attribute_cards(&self) -> HashSet<CardId>

which attribute cards describe this instance?

Source

pub fn is_attribute(&self) -> bool

Source

pub fn is_instance(&self) -> bool

Source

pub fn is_class(&self) -> bool

Source

pub fn is_instance_of(&self, _class: CardId) -> bool

Source

pub async fn set_ref(self, reff: CardId) -> Result<Card, EventError<RawCard>>

Source

pub fn add_dependency( &mut self, dependency: CardId, ) -> Result<(), EventError<RawCard>>

Source

pub fn back_side(&self) -> Option<&BackSide>

Source

pub fn recursive_dependents(&self) -> HashSet<CardId>

Source

pub fn recursive_dependencies(&self) -> Vec<CardId>

Source

pub fn min_rec_stability(&self) -> f32

Source

pub fn min_rec_recall_rate(&self) -> RecallRate

Source

pub fn display_backside(&self) -> &str

Source

pub fn back_refs(&self) -> Option<NonEmpty<CardId>>

Source

pub fn history(&self) -> &History

Source

pub fn recall_rate_at(&self, current_unix: Duration) -> Option<RecallRate>

Source

pub fn full_history(&self) -> History

Full history includes all the successful reviews of cards that are dependent on this card. the idea is, if you can successfully recall a dependent card, then implicitly you know this card too. It does not include unsuccesful reviews of dependents because you may have failed to realize that card either due to the card itself or another dependency.

Source

pub fn full_recall_rate(&self) -> Option<RecallRate>

Source

pub fn recall_rate(&self) -> Option<RecallRate>

Source

pub fn maturity_days(&self) -> Option<f32>

Source

pub fn maturity(&self) -> Option<Duration>

Source

pub fn print(&self) -> String

Source

pub fn backside(&self) -> &EvalText

Source

pub fn name(&self) -> &EvalText

Source

pub fn name_textdata(&self) -> TextData

Source

pub fn front_side(&self) -> &EvalText

Source

pub fn is_pending(&self) -> bool

Source

pub fn is_suspended(&self) -> bool

Source

pub fn set_suspend(&mut self, suspend: bool)

Source

pub fn time_since_last_review(&self) -> Option<Duration>

Source

pub fn id(&self) -> CardId

Source

pub fn explicit_dependencies(&self) -> HashSet<CardId>

Source

pub fn dependencies(&self) -> HashSet<CardId>

Source

pub fn lapses(&self) -> u32

Trait Implementations§

Source§

impl Clone for Card

Source§

fn clone(&self) -> Card

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Card

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Card

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Ord for Card

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Card

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Card

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Eq for Card

Auto Trait Implementations§

§

impl Freeze for Card

§

impl RefUnwindSafe for Card

§

impl Send for Card

§

impl Sync for Card

§

impl Unpin for Card

§

impl UnwindSafe for Card

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more