pub enum StructureMode {
Flat,
FlatGrouped,
Nested,
NestedGrouped,
}
Expand description
An enum representing the ways to structure a template’s rendered files.
Variants§
Flat
When selected, the template is rendered to the output directory without any structure.
output-mode: flat
[ouput-directory]
│
├─ [template-name-01].[extension]
├─ [template-name-01].[extension]
└─ ...
FlatGrouped
When selected, the template is rendered to the output directory and placed inside a
directory named after its group
. This useful if there are multiple related and unrelated
templates being rendered to the same directory.
output-mode: flat-grouped
[ouput-directory]
│
├─ [template-group-01]
│ ├─ [template-name-01].[extension]
│ ├─ [template-name-01].[extension]
│ └─ ...
│
├─ [template-group-02]
│ └─ ...
└─ ...
Nested
When selected, the template is rendered to the output directory and placed inside a
directory named after its nested-directory-template
. This useful if multiple templates are
used to represent a single book i.e. a book template used to render a book’s information to
a single file and an annotation template used to render each annotation to a separate file.
output-mode: nested
[ouput-directory]
│
├─ [author-title-01]
│ ├─ [template-name-01].[extension]
│ ├─ [template-name-01].[extension]
│ └─ ...
│
├─ [author-title-02]
│ └─ ...
└─ ...
NestedGrouped
When selected, the template is rendered to the output directory and placed inside a
directory named after its group
and another named after its nested-directory-template
.
This useful if multiple templates are used to represent a single book i.e. a book template
and an annotation template and there are multiple related and unrelated templates being
rendered to the same directory.
output-mode: nested-grouped
[ouput-directory]
│
├─ [template-group-01]
│ │
│ ├─ [author-title-01]
│ │ ├─ [template-name-01].[extension]
│ │ ├─ [template-name-01].[extension]
│ │ └─ ...
│ │
│ ├─ [author-title-02]
│ │ ├─ [template-name-02].[extension]
│ │ ├─ [template-name-02].[extension]
│ │ └─ ...
│ └─ ...
│
├─ [template-group-02]
│ ├─ [author-title-01]
│ │ └─ ...
│ └─ ...
└─ ...
Trait Implementations§
Source§impl Clone for StructureMode
impl Clone for StructureMode
Source§fn clone(&self) -> StructureMode
fn clone(&self) -> StructureMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StructureMode
impl Debug for StructureMode
Source§impl<'de> Deserialize<'de> for StructureMode
impl<'de> Deserialize<'de> for StructureMode
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>,
impl Copy for StructureMode
Auto Trait Implementations§
impl Freeze for StructureMode
impl RefUnwindSafe for StructureMode
impl Send for StructureMode
impl Sync for StructureMode
impl Unpin for StructureMode
impl UnwindSafe for StructureMode
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
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>
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>
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