pub struct FrameDoc {
pub path: String,
pub source: String,
}Expand description
A document that frames every page — a site’s header or footer — as the text of the file and the path it was read from.
The path is load-bearing twice over: its extension decides the grammar the text is parsed in, and relative links in the text resolve against it.
Here rather than in [crate::site], which consumes it, because the caller
that assembles one has only read a file: plates builds a FrameDoc from
a vault without enabling templating, and the type it hands over cannot
live behind a feature it does not turn on.
Fields§
§path: StringVault-relative path, spelled the way SourceDoc::path is: no leading
slash, extension included.
source: StringThe file’s text, metadata block and all.
Trait Implementations§
impl Eq for FrameDoc
impl StructuralPartialEq for FrameDoc
Auto Trait Implementations§
impl Freeze for FrameDoc
impl RefUnwindSafe for FrameDoc
impl Send for FrameDoc
impl Sync for FrameDoc
impl Unpin for FrameDoc
impl UnsafeUnpin for FrameDoc
impl UnwindSafe for FrameDoc
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.