pub struct MediaBlock<'src> { /* private fields */ }Expand description
A media block is used to represent an image, video, or audio block macro.
Implementations§
Source§impl<'src> MediaBlock<'src>
impl<'src> MediaBlock<'src>
Sourcepub fn child_blocks(&'src self) -> ChildBlocks<'src> ⓘ
pub fn child_blocks(&'src self) -> ChildBlocks<'src> ⓘ
Returns a document-order iterator over this block’s direct child blocks.
A media block (image, audio, or video) never has child blocks, so this
iterator is always empty. See FindBlocks
to search from a Block or
Document.
Sourcepub fn target(&'src self) -> Option<&'src Span<'src>>
pub fn target(&'src self) -> Option<&'src Span<'src>>
Return a Span describing the macro target.
This is the target exactly as written in the source, before any
attribute references within it are resolved. See
resolved_target() for the resolved form.
Sourcepub fn resolved_target(&self) -> &str
pub fn resolved_target(&self) -> &str
Return the macro target after any attribute references within it have
been resolved (honoring the attribute-missing document attribute).
For the common case of a target with no attribute references, this is
identical to the text of target().
Sourcepub fn macro_attrlist(&'src self) -> &'src Attrlist<'src>
pub fn macro_attrlist(&'src self) -> &'src Attrlist<'src>
Return the macro’s attribute list.
IMPORTANT: This is the list of attributes within the macro block definition itself.
See also attrlist() for attributes that can be defined before the
macro invocation.
Trait Implementations§
Source§impl<'src> Clone for MediaBlock<'src>
impl<'src> Clone for MediaBlock<'src>
Source§fn clone(&self) -> MediaBlock<'src>
fn clone(&self) -> MediaBlock<'src>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'src> Debug for MediaBlock<'src>
impl<'src> Debug for MediaBlock<'src>
impl<'src> Eq for MediaBlock<'src>
Source§impl<'src> HasSpan<'src> for MediaBlock<'src>
impl<'src> HasSpan<'src> for MediaBlock<'src>
Source§impl<'src> Hash for MediaBlock<'src>
impl<'src> Hash for MediaBlock<'src>
Source§impl<'src> IsBlock<'src> for MediaBlock<'src>
impl<'src> IsBlock<'src> for MediaBlock<'src>
Source§fn content_model(&self) -> ContentModel
fn content_model(&self) -> ContentModel
ContentModel for this block.Source§fn raw_context(&self) -> CowStr<'src>
fn raw_context(&self) -> CowStr<'src>
Source§fn title_source(&'src self) -> Option<Span<'src>>
fn title_source(&'src self) -> Option<Span<'src>>
Source§fn caption(&self) -> Option<&str>
fn caption(&self) -> Option<&str>
Source§fn number(&self) -> Option<usize>
fn number(&self) -> Option<usize>
Source§fn anchor_reftext(&'src self) -> Option<Span<'src>>
fn anchor_reftext(&'src self) -> Option<Span<'src>>
Source§fn attrlist(&'src self) -> Option<&'src Attrlist<'src>>
fn attrlist(&'src self) -> Option<&'src Attrlist<'src>>
Source§fn rendered_content(&'src self) -> Option<&'src str>
fn rendered_content(&'src self) -> Option<&'src str>
Source§fn resolved_context(&'src self) -> CowStr<'src>
fn resolved_context(&'src self) -> CowStr<'src>
Source§fn declared_style(&'src self) -> Option<&'src str>
fn declared_style(&'src self) -> Option<&'src str>
Source§fn child_blocks_mut(&mut self) -> &mut [Block<'src>]
fn child_blocks_mut(&mut self) -> &mut [Block<'src>]
Source§fn content_mut(&mut self) -> Option<&mut Content<'src>>
fn content_mut(&mut self) -> Option<&mut Content<'src>>
Source§fn options(&'src self) -> Vec<&'src str>
fn options(&'src self) -> Vec<&'src str>
Source§fn has_option<N: AsRef<str>>(&'src self, name: N) -> bool
fn has_option<N: AsRef<str>>(&'src self, name: N) -> bool
true if this block has the named option. Read more