Skip to main content

MarkerHandlers

Struct MarkerHandlers 

Source
pub struct MarkerHandlers<'a> { /* private fields */ }
Expand description

Registry of marker-prefix → handler, used by resolve_deferred_markers to dispatch Deferred embeds (crate::resolve::embed_renderer::RenderedEmbed::Deferred) in a post-pass.

The built-in moss-embed: (markdown transclusion) is not dispatched here — it’s resolved by resolve_embeds in an earlier pass. This registry handles typed prefixes: moss-embed-ipynb, moss-embed-table, moss-embed-plugin-<name>, etc.

Use super::embed_renderer::MARKER_IPYNB / super::embed_renderer::MARKER_TABLE (etc.) as prefixes to avoid stringly-typed drift.

Implementations§

Source§

impl<'a> MarkerHandlers<'a>

Source

pub fn new() -> Self

Source

pub fn register( &mut self, prefix: impl Into<String>, handler: MarkerHandler<'a>, )

Register a handler for markers whose prefix is <prefix>:.

prefix should NOT include the trailing colon — the scanner matches <!-- <prefix>: automatically.

Source

pub fn is_empty(&self) -> bool

Trait Implementations§

Source§

impl<'a> Default for MarkerHandlers<'a>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for MarkerHandlers<'a>

§

impl<'a> !UnwindSafe for MarkerHandlers<'a>

§

impl<'a> Freeze for MarkerHandlers<'a>

§

impl<'a> Send for MarkerHandlers<'a>

§

impl<'a> Sync for MarkerHandlers<'a>

§

impl<'a> Unpin for MarkerHandlers<'a>

§

impl<'a> UnsafeUnpin for MarkerHandlers<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.