pub struct MdDocument {
pub document: Document,
pub style_registry: StyleRegistry,
}Expand description
Result of decoding markdown, containing both the document and the
StyleRegistry resolved from the template.
Keeping these together lets callers pass the registry downstream (e.g. to the HWPX encoder) without re-resolving the template.
§Examples
ⓘ
use hwpforge_blueprint::builtins::builtin_default;
use hwpforge_smithy_hwpx::HwpxStyleStore;
use hwpforge_smithy_md::MdDecoder;
let template = builtin_default().unwrap();
let result = MdDecoder::decode("# Title\n\nBody text", &template).unwrap();
// Access the document
let doc = result.document.validate().unwrap();
// Bridge styles to HWPX encoder
let store = HwpxStyleStore::from_registry(&result.style_registry);Fields§
§document: DocumentThe decoded Core document.
style_registry: StyleRegistryThe style registry resolved from the template.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MdDocument
impl RefUnwindSafe for MdDocument
impl Send for MdDocument
impl Sync for MdDocument
impl Unpin for MdDocument
impl UnwindSafe for MdDocument
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