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 target(&'src self) -> Option<&'src Span<'src>>
pub fn target(&'src self) -> Option<&'src Span<'src>>
Return a Span describing the macro 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>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'src> Debug for MediaBlock<'src>
impl<'src> Debug for MediaBlock<'src>
Source§impl<'src> HasSpan<'src> for MediaBlock<'src>
impl<'src> HasSpan<'src> 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
Returns the
ContentModel for this block.Source§fn raw_context(&self) -> CowStr<'src>
fn raw_context(&self) -> CowStr<'src>
Returns the raw (uninterpreted) context for this block. Read more
Source§fn title_source(&'src self) -> Option<Span<'src>>
fn title_source(&'src self) -> Option<Span<'src>>
Returns the source text for the title for this block, if present.
Source§fn anchor_reftext(&'src self) -> Option<Span<'src>>
fn anchor_reftext(&'src self) -> Option<Span<'src>>
Returns the reference text for this block’s anchor, if present.
Source§fn attrlist(&'src self) -> Option<&'src Attrlist<'src>>
fn attrlist(&'src self) -> Option<&'src Attrlist<'src>>
Returns the attribute list for this block, if present.
Source§fn resolved_context(&'src self) -> CowStr<'src>
fn resolved_context(&'src self) -> CowStr<'src>
Returns the resolved context for this block. Read more
Source§fn declared_style(&'src self) -> Option<&'src str>
fn declared_style(&'src self) -> Option<&'src str>
Returns the declared (uninterpreted) style for this block. Read more
Source§fn nested_blocks(&'src self) -> Iter<'src, Block<'src>>
fn nested_blocks(&'src self) -> Iter<'src, Block<'src>>
Returns an iterator over the nested blocks contained within
this block. Read more
Source§fn options(&'src self) -> Vec<&'src str>
fn options(&'src self) -> Vec<&'src str>
Returns any option attributes that were found. Read more
Source§fn has_option<N: AsRef<str>>(&'src self, name: N) -> bool
fn has_option<N: AsRef<str>>(&'src self, name: N) -> bool
Returns
true if this block has the named option. Read moreSource§fn substitution_group(&'src self) -> SubstitutionGroup
fn substitution_group(&'src self) -> SubstitutionGroup
Returns the default substitution group that is applied unless you
customize the substitutions for a particular element.
Source§impl<'src> PartialEq for MediaBlock<'src>
impl<'src> PartialEq for MediaBlock<'src>
impl<'src> Eq for MediaBlock<'src>
impl<'src> StructuralPartialEq for MediaBlock<'src>
Auto Trait Implementations§
impl<'src> Freeze for MediaBlock<'src>
impl<'src> RefUnwindSafe for MediaBlock<'src>
impl<'src> Send for MediaBlock<'src>
impl<'src> Sync for MediaBlock<'src>
impl<'src> Unpin for MediaBlock<'src>
impl<'src> UnwindSafe for MediaBlock<'src>
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