pub struct BlockQuote {
pub body: Vec<MdElem>,
}Expand description
Container markdown representing block-quoted text.
§Examples
use mdq::md_elem::{*, elem::*};
let md_text = r"
> Hello, world
";
let parsed = MdDoc::parse(md_text, &ParseOptions::gfm()).unwrap();
let expected = vec![
MdElem::BlockQuote(BlockQuote{
body: vec![
MdElem::Paragraph(Paragraph{
body: vec![Inline::Text(Text{
variant: TextVariant::Plain,
value: "Hello, world".to_string(),
})]
})
]
})
];
assert_eq!(parsed.roots, expected);Fields§
§body: Vec<MdElem>Trait Implementations§
Source§impl Clone for BlockQuote
impl Clone for BlockQuote
Source§fn clone(&self) -> BlockQuote
fn clone(&self) -> BlockQuote
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 moreSource§impl Debug for BlockQuote
impl Debug for BlockQuote
Source§impl From<BlockQuote> for MdElem
impl From<BlockQuote> for MdElem
Source§fn from(value: BlockQuote) -> Self
fn from(value: BlockQuote) -> Self
Converts to this type from the input type.
Source§impl Hash for BlockQuote
impl Hash for BlockQuote
Source§impl PartialEq for BlockQuote
impl PartialEq for BlockQuote
impl Eq for BlockQuote
impl StructuralPartialEq for BlockQuote
Auto Trait Implementations§
impl Freeze for BlockQuote
impl RefUnwindSafe for BlockQuote
impl Send for BlockQuote
impl Sync for BlockQuote
impl Unpin for BlockQuote
impl UnsafeUnpin for BlockQuote
impl UnwindSafe for BlockQuote
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