pub struct Document<C> {
pub content: C,
pub metadata: DocumentMetadata,
pub variables: DocumentVariables,
pub ids: HashMap<String, (usize, Vec<ShortCodeCall>)>,
pub id_map: HashMap<String, (usize, ShortCodeCall)>,
}
Fields§
§content: C
§metadata: DocumentMetadata
§variables: DocumentVariables
§ids: HashMap<String, (usize, Vec<ShortCodeCall>)>
§id_map: HashMap<String, (usize, ShortCodeCall)>
Implementations§
Trait Implementations§
source§impl<'de, C> Deserialize<'de> for Document<C>where
C: Deserialize<'de>,
impl<'de, C> Deserialize<'de> for Document<C>where C: Deserialize<'de>,
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
Auto Trait Implementations§
impl<C> RefUnwindSafe for Document<C>where C: RefUnwindSafe,
impl<C> Send for Document<C>where C: Send,
impl<C> Sync for Document<C>where C: Sync,
impl<C> Unpin for Document<C>where C: Unpin,
impl<C> UnwindSafe for Document<C>where C: UnwindSafe,
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, 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.