pub struct ParsedEmbed<'a> {
pub resolved_path: &'a str,
pub from_path: &'a str,
pub pinned_url: &'a str,
pub query: Option<&'a str>,
pub section: Option<&'a str>,
pub alias: Option<&'a str>,
pub width: Option<&'static str>,
pub attrs: Option<AttrBlock>,
}Expand description
An embed that has been parsed and path-resolved, ready for rendering.
Fields§
§resolved_path: &'a strResolved target path, as returned by the ContentGraph.
from_path: &'a strThe calling file’s path — identifies the referencing note, and is NOT an
input to the emitted URL (see Self::pinned_url).
pinned_url: &'a strThe URL the site serves Self::resolved_path at, pinned once by the
dispatcher via ContentGraph::pinned_url. Emit it verbatim; re-deriving
a URL per referencing page is moss#903 bug 3.
query: Option<&'a str>?query from the source wikilink, without the leading ?.
section: Option<&'a str>#fragment from the source wikilink, without the leading #.
For .md renderers this is a heading/block-ref marker (block refs
keep their ^ prefix). For every other renderer this is a URL fragment.
alias: Option<&'a str>|pipe-content from the source wikilink — with any spec § P9 width
token already split out into Self::width. Image renderer uses
this for display keywords / size; other renderers parse per their
convention.
width: Option<&'static str>Canonical width value (body | wide | page | screen) extracted from
the pipe-alias by the wikilink resolver. None means the author
did not include a width token; renderers omit data-width in that
case so themes can target the default via :not([data-width]).
full is normalised to screen upstream — values reaching here
are already in value-space terms (see
crate::media::match_width_token).
attrs: Option<AttrBlock>Trailing Pandoc {.class key=value} attribute block, if present.
Per Decision #8 of the unified-image-emission architecture, Pandoc- style attribute blocks are the canonical author surface for moss- vocabulary attributes; the pipe-keyword form remains as compat sugar. When both are present, the attribute block wins on typed-field conflicts (Decision #11); class lists union+dedupe.
Trait Implementations§
Source§impl<'a> Clone for ParsedEmbed<'a>
impl<'a> Clone for ParsedEmbed<'a>
Source§fn clone(&self) -> ParsedEmbed<'a>
fn clone(&self) -> ParsedEmbed<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for ParsedEmbed<'a>
impl<'a> Debug for ParsedEmbed<'a>
Source§impl<'a> Default for ParsedEmbed<'a>
impl<'a> Default for ParsedEmbed<'a>
Source§fn default() -> ParsedEmbed<'a>
fn default() -> ParsedEmbed<'a>
impl<'a> Eq for ParsedEmbed<'a>
Source§impl<'a> PartialEq for ParsedEmbed<'a>
impl<'a> PartialEq for ParsedEmbed<'a>
impl<'a> StructuralPartialEq for ParsedEmbed<'a>
Auto Trait Implementations§
impl<'a> Freeze for ParsedEmbed<'a>
impl<'a> RefUnwindSafe for ParsedEmbed<'a>
impl<'a> Send for ParsedEmbed<'a>
impl<'a> Sync for ParsedEmbed<'a>
impl<'a> Unpin for ParsedEmbed<'a>
impl<'a> UnsafeUnpin for ParsedEmbed<'a>
impl<'a> UnwindSafe for ParsedEmbed<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.