pub struct Example {
pub title: String,
pub description: String,
pub body: String,
}
Expand description
Specification of a template example.
Fields§
§title: String
§description: String
§body: String
The markdown source for the example (should generally contain a call to the shortcode)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Example
impl<'de> Deserialize<'de> for Example
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 PartialEq<Example> for Example
impl PartialEq<Example> for Example
impl StructuralPartialEq for Example
Auto Trait Implementations§
impl RefUnwindSafe for Example
impl Send for Example
impl Sync for Example
impl Unpin for Example
impl UnwindSafe for Example
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.