[−][src]Struct mdbook_cat_prep::cat_context::CatContext
Cat kontext
Typ obsahující kompletní kotext cat-prepu
.
Jednotlivé struktury obsahují spoustu redundance,
za účelem jednoduchého vyhledávání potřebných informací.
Nedoporučuje se tedy tento instance tohoto typu
po vytvoření mutovat, protože redudantní kopie jednotlivých
objektů si mohou přestat vzájemně odpovídat
Fields
teacher_cards: Vec<TeacherCard>
obsahuje karty jednotlivých kantorů
teachers: Vec<Teacher>
profily vyučujících
subject_cards: Vec<SubjectCard>
karty předmětů
subjects: Vec<Subject>
předměty
article_cards: Vec<ArticleCard>
karty článků
articles: Vec<Article>
články
obsahuje hashmapu tagů
tagy jsou sesbírány z jednotlivých článků, jako hodnoty pak figurují články, které mají daný tag přidělený
při renderování je tato hashmapa zkonvertována
na typ TagContext
, který je prakticky newtype
pattern na typu Vec<(String, Vec<ArticleCard>)>
.
TagContext
je následně využit jako šablonový
kontext pro generování stránky s tagy.
Implementations
impl CatContext
[src]
pub fn new() -> CatContext
[src]
vygeneruje prázdný CatContext
.
Užitečné pro generování umělého kontextu
pub fn with_book(src: &mut Book) -> Result<CatContext, CatError>
[src]
vygeneruje kontext dle knihy. Tato funkce knihu mutuje, protože odděluje headery od obsahu jednotlivých souborů
Trait Implementations
impl Clone for CatContext
[src]
pub fn clone(&self) -> CatContext
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CatContext
[src]
impl<'de> Deserialize<'de> for CatContext
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for CatContext
[src]
Auto Trait Implementations
impl RefUnwindSafe for CatContext
[src]
impl Send for CatContext
[src]
impl Sync for CatContext
[src]
impl Unpin for CatContext
[src]
impl UnwindSafe for CatContext
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,