Struct cdoc::config::DynamicFormat
source · pub struct DynamicFormat {
pub extension: String,
pub template_prefix: String,
pub name: String,
pub renderer: Box<dyn DocumentRenderer>,
pub include_resources: bool,
pub layout: Option<String>,
}
Expand description
Custom output format definition. It should be possible to create almost any text-based output.
Fields§
§extension: String
Output file extension
template_prefix: String
Template prefix (used in template files)
name: String
Format name (used for build folder)
renderer: Box<dyn DocumentRenderer>
Renderer to use (generic or notebook)
include_resources: bool
Include resources folder in output
layout: Option<String>
Use layout template
Trait Implementations§
source§impl Clone for DynamicFormat
impl Clone for DynamicFormat
source§fn clone(&self) -> DynamicFormat
fn clone(&self) -> DynamicFormat
Returns a copy 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 moresource§impl Debug for DynamicFormat
impl Debug for DynamicFormat
source§impl<'de> Deserialize<'de> for DynamicFormat
impl<'de> Deserialize<'de> for DynamicFormat
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Format for DynamicFormat
impl Format for DynamicFormat
source§fn template_prefix(&self) -> &str
fn template_prefix(&self) -> &str
Template format name. Useful if templates are reused across formats as is the case for
notebooks which use markdown.
source§fn name(&self) -> &str
fn name(&self) -> &str
Format name that is used in status messages, build output and in the configuration file.
source§fn no_parse(&self) -> bool
fn no_parse(&self) -> bool
Return true if the format should not be parsed. This may be removed in the future and is
currently only used for the info format which exports all parsed contents in a project.
source§fn renderer(&self) -> Box<dyn DocumentRenderer>
fn renderer(&self) -> Box<dyn DocumentRenderer>
Return a renderer instance. Currently does not allow for configuration.
source§fn include_resources(&self) -> bool
fn include_resources(&self) -> bool
Determines whether non-source files should be copied to
fn layout(&self) -> Option<String>
Auto Trait Implementations§
impl !RefUnwindSafe for DynamicFormat
impl Send for DynamicFormat
impl Sync for DynamicFormat
impl Unpin for DynamicFormat
impl !UnwindSafe for DynamicFormat
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, R> RenderElement<Vec<R, Global>> for Twhere
T: RenderElement<R>,
impl<T, R> RenderElement<Vec<R, Global>> for Twhere T: RenderElement<R>,
source§fn render(
&mut self,
elem: &Vec<R, Global>,
ctx: &RenderContext<'_>,
buf: impl Write
) -> Result<(), Error>
fn render( &mut self, elem: &Vec<R, Global>, ctx: &RenderContext<'_>, buf: impl Write ) -> Result<(), Error>
Render the element to a buffer
source§fn render_inner(&mut self, elem: &T, ctx: &RenderContext<'_>) -> Result<String>
fn render_inner(&mut self, elem: &T, ctx: &RenderContext<'_>) -> Result<String>
Convenience function for creating a buffer, rendering the element into the buffer, and
returning the result as a string. This is useful when an inner element needs to be rendered
first to be used in an outer element, hence the name.
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
source§impl<T> Variant for Twhere
T: Any + Clone + SendSync,
impl<T> Variant for Twhere T: Any + Clone + SendSync,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert this
Variant
trait object to &mut dyn Any
.source§fn as_boxed_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn as_boxed_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert this
Variant
trait object to Box<dyn Any>
.