pub struct TemplatePartial {
pub id: String,
pub contents: String,
}Expand description
A struct representing an unconfigured partial template.
Partial templates get their configuration from the normal templates that include them.
Fields§
§id: StringThe template’s id.
This is the file path relative to the templates directory. It serves to identify a partial
template when called in an include tag from within a non-partial template.
--> /path/to/templates/nested/template.md
--> nested/template.md
--> {% include "nested/template.md" %}contents: StringThe unparsed contents of the template.
This gets parsed and validated only if its called in an include tag in a non-partial
template that is being registered/parsed/valiated.
Implementations§
Trait Implementations§
Source§impl Clone for TemplatePartial
impl Clone for TemplatePartial
Source§fn clone(&self) -> TemplatePartial
fn clone(&self) -> TemplatePartial
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TemplatePartial
impl RefUnwindSafe for TemplatePartial
impl Send for TemplatePartial
impl Sync for TemplatePartial
impl Unpin for TemplatePartial
impl UnwindSafe for TemplatePartial
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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