pub struct MdxBodyEmitter { /* private fields */ }Expand description
Builds an MDX-runtime body: _createMdxContent(props) returning a tree
of jsx/jsxs/Fragment. Output shape follows @mdx-js/mdx’s
function-body format:
Fragment/jsx/jsxsfromarguments[0]_components = { tag: "tag", ..., ...props.components }– only referenced intrinsics get a default entry- capitalized JSX names destructured off
_componentsand validated via_missingMdxReference jsxfor zero/one child,jsxsfor multiple
Implementations§
Source§impl MdxBodyEmitter
impl MdxBodyEmitter
pub fn new() -> Self
pub fn render(doc: &Document) -> (String, DiagnosticEngine<Code>)
pub fn into_parts(self) -> (String, DiagnosticEngine<Code>)
pub fn into_string(self) -> String
Trait Implementations§
Source§impl Debug for MdxBodyEmitter
impl Debug for MdxBodyEmitter
Source§impl Default for MdxBodyEmitter
impl Default for MdxBodyEmitter
Auto Trait Implementations§
impl Freeze for MdxBodyEmitter
impl RefUnwindSafe for MdxBodyEmitter
impl Send for MdxBodyEmitter
impl Sync for MdxBodyEmitter
impl Unpin for MdxBodyEmitter
impl UnsafeUnpin for MdxBodyEmitter
impl UnwindSafe for MdxBodyEmitter
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