pub struct Caption<'t> {
pub node: NodeRef<'t, Flm>,
pub alt: Option<Vec<WrittenPiece<'t>>>,
/* private fields */
}Expand description
A float’s caption, read from its first \caption command
(read_caption): the command’s node, and the caption’s alternative text
where its optional argument gives one.
Fields§
§node: NodeRef<'t, Flm>The \caption node.
alt: Option<Vec<WrittenPiece<'t>>>The caption’s alternative text, which a reference to an
unnumbered float shows in place of the full caption: the value of
alt= as written in the document, as nodes of the optional argument
and as text cut from a run of characters that also holds the key.
None where the optional argument gives no alt= that can be read.
Implementations§
Source§impl<'t> Caption<'t>
impl<'t> Caption<'t>
Sourcepub fn content(&self) -> Vec<NodeRef<'t, Flm>>
pub fn content(&self) -> Vec<NodeRef<'t, Flm>>
Returns the caption’s full content: the nodes of its mandatory argument. Returns an empty list where the argument holds nothing.
Sourcepub fn shown_content(&self, float: &NodeRef<'t, Flm>) -> Option<ContentRef>
pub fn shown_content(&self, float: &NodeRef<'t, Flm>) -> Option<ContentRef>
Returns what a reference to the float shows where the float has no
number, as the content of its reference point
(RefPoint::content):
- where the optional argument gives an alternative text, a copy of it
in a synthesized value of its own
(
ContentRef::Synthesized);float, the float node, gives the position in the source of the parts of the copy that have none of their own; - otherwise, the caption’s mandatory argument where it is written as
one group or one token, referred to by that node
(
ContentRef::Node); Noneotherwise, and where the copy fails, which only content nested deeper than the recursion guard allows can cause (the parse refuses such content first).
Trait Implementations§
Auto Trait Implementations§
impl<'t> !RefUnwindSafe for Caption<'t>
impl<'t> !UnwindSafe for Caption<'t>
impl<'t> Forget for Caption<'t>
impl<'t> Freeze for Caption<'t>where
&'t NodeTree<Flm>: Freeze,
*const u8 is !null: Freeze,
PhantomData<WrittenPiece<'t>>: Freeze,
PhantomData<CaptionProblem>: Freeze,
impl<'t> Move for Caption<'t>
impl<'t> Send for Caption<'t>
impl<'t> Sync for Caption<'t>
impl<'t> Unpin for Caption<'t>
impl<'t> UnsafeUnpin for Caption<'t>where
&'t NodeTree<Flm>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<WrittenPiece<'t>>: UnsafeUnpin,
PhantomData<CaptionProblem>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more