pub struct FlatPageStore {
pub pages: HashMap<String, FlatPageMeta>,
/* private fields */
}Expand description
A store for FlatPageMeta
Fields§
§pages: HashMap<String, FlatPageMeta>Maps file stems to pages metadata
Implementations§
Source§impl FlatPageStore
impl FlatPageStore
Sourcepub fn meta_by_url(&self, url: &str) -> Option<&FlatPageMeta>
pub fn meta_by_url(&self, url: &str) -> Option<&FlatPageMeta>
Returns a page metadata by its url
Sourcepub fn page_by_url<E: DeserializeOwned>(
&self,
url: &str,
) -> Result<Option<FlatPage<E>>>
pub fn page_by_url<E: DeserializeOwned>( &self, url: &str, ) -> Result<Option<FlatPage<E>>>
Returns a page by its url
Sourcepub fn meta_by_stem(&self, stem: &str) -> Option<&FlatPageMeta>
pub fn meta_by_stem(&self, stem: &str) -> Option<&FlatPageMeta>
Returns a page metadata by the file stem
Sourcepub fn page_by_stem<E: DeserializeOwned>(
&self,
stem: &str,
) -> Result<Option<FlatPage<E>>>
pub fn page_by_stem<E: DeserializeOwned>( &self, stem: &str, ) -> Result<Option<FlatPage<E>>>
Returns a page by the file stem
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlatPageStore
impl RefUnwindSafe for FlatPageStore
impl Send for FlatPageStore
impl Sync for FlatPageStore
impl Unpin for FlatPageStore
impl UnwindSafe for FlatPageStore
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