pub struct MdContext(/* private fields */);Trait Implementations§
Source§impl<'src> Context<'src, 'static> for MdContext
impl<'src> Context<'src, 'static> for MdContext
type View = Result<VNode, RenderError>
type Handler<T: 'static> = Callback<T>
type MouseEvent = Event<MouseData>
Source§fn el_with_attributes(
self,
e: HtmlElement,
inside: Self::View,
attributes: ElementAttributes<EventHandler<MouseEvent>>,
) -> Self::View
fn el_with_attributes( self, e: HtmlElement, inside: Self::View, attributes: ElementAttributes<EventHandler<MouseEvent>>, ) -> Self::View
creates a html element
attributes contains the html attributes for this elementSource§fn el_span_with_inner_html(
self,
inner_html: String,
attributes: ElementAttributes<EventHandler<MouseEvent>>,
) -> Self::View
fn el_span_with_inner_html( self, inner_html: String, attributes: ElementAttributes<EventHandler<MouseEvent>>, ) -> Self::View
renders raw html, inside a span
Source§fn el_hr(
self,
attributes: ElementAttributes<EventHandler<MouseEvent>>,
) -> Self::View
fn el_hr( self, attributes: ElementAttributes<EventHandler<MouseEvent>>, ) -> Self::View
renders a
hr element, with attributesSource§fn el_fragment(self, children: Vec<Self::View>) -> Self::View
fn el_fragment(self, children: Vec<Self::View>) -> Self::View
takes a vector of views and return a view
Source§fn mount_dynamic_link(
self,
_rel: &str,
_href: &str,
_integrity: &str,
_crossorigin: &str,
)
fn mount_dynamic_link( self, _rel: &str, _href: &str, _integrity: &str, _crossorigin: &str, )
add a styleshit to the markdown component
fn el_input_checkbox( self, checked: bool, attributes: ElementAttributes<EventHandler<MouseEvent>>, ) -> Self::View
Source§fn props(self) -> MarkdownProps
fn props(self) -> MarkdownProps
get all the properties from the context
Source§fn call_handler<T: 'static>(callback: &Self::Handler<T>, input: T)
fn call_handler<T: 'static>(callback: &Self::Handler<T>, input: T)
calls a callback with the given input
Source§fn make_md_handler(
self,
position: Range<usize>,
stop_propagation: bool,
) -> Self::Handler<MouseEvent>
fn make_md_handler( self, position: Range<usize>, stop_propagation: bool, ) -> Self::Handler<MouseEvent>
creates a callback that will fire when the user clicks on markdown
Source§fn set_frontmatter(&mut self, frontmatter: String)
fn set_frontmatter(&mut self, frontmatter: String)
write the frontmatter (or metadata) string
present at the top of the markdown source
fn has_custom_links(self) -> bool
fn render_links( self, link: LinkDescription<Self::View>, ) -> Result<Self::View, String>
fn has_custom_component(self, name: &str) -> bool
fn render_custom_component( self, name: &str, input: MdComponentProps, ) -> Result<Self::View, ComponentCreationError>
Source§fn el(self, e: HtmlElement, inside: Self::View) -> Self::View
fn el(self, e: HtmlElement, inside: Self::View) -> Self::View
creates a html element, with default attributes
fn render_tasklist_marker(self, m: bool, position: Range<usize>) -> Self::View
fn render_rule(self, range: Range<usize>) -> Self::View
fn render_code(self, s: CowStr<'a>, range: Range<usize>) -> Self::View
fn render_text(self, s: CowStr<'a>, range: Range<usize>) -> Self::View
fn render_link( self, link: LinkDescription<Self::View>, ) -> Result<Self::View, String>
impl Copy for MdContext
Auto Trait Implementations§
impl Freeze for MdContext
impl !RefUnwindSafe for MdContext
impl !Send for MdContext
impl !Sync for MdContext
impl Unpin for MdContext
impl !UnwindSafe for MdContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.