Struct speki_backend::categories::Category
source · pub struct Category(pub Vec<String>);Tuple Fields§
§0: Vec<String>Implementations§
source§impl Category
impl Category
pub fn root() -> Self
pub fn joined(&self) -> String
pub fn from_dir_path(path: &Path) -> Self
pub fn from_card_path(path: &Path) -> Self
pub fn rec_get_containing_cards(&self) -> Vec<SavedCard>
pub fn get_containing_cards(&self) -> HashSet<SavedCard>
pub fn get_containing_card_ids(&self) -> HashSet<Id>
pub fn sort_categories(categories: &mut [Category])
pub fn get_following_categories(&self) -> HashSet<Self>
pub fn print_it(&self) -> String
pub fn print_full(&self) -> String
pub fn print_it_with_depth(&self) -> String
pub fn import_category() -> Self
pub fn load_all() -> Result<Vec<Self>>
pub fn _append(self, category: &str) -> Self
pub fn as_path(&self) -> PathBuf
pub fn get_unfinished_cards(&self, cache: &mut CardCache) -> Vec<Id>
pub fn get_pending_cards(&self, cache: &mut CardCache) -> Vec<Id>
pub fn get_random_review_cards(&self, cache: &mut CardCache) -> Vec<Id>
pub fn get_review_cards(&self, cache: &mut CardCache) -> Vec<Id>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Category
impl<'de> Deserialize<'de> for Category
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Category
impl Ord for Category
source§impl PartialEq for Category
impl PartialEq for Category
source§impl PartialOrd for Category
impl PartialOrd for Category
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Category
impl StructuralEq for Category
impl StructuralPartialEq for Category
Auto Trait Implementations§
impl RefUnwindSafe for Category
impl Send for Category
impl Sync for Category
impl Unpin for Category
impl UnwindSafe for Category
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.