#[non_exhaustive]pub enum EntryPiece {
Text(String),
Source(Arc<FlmSource>),
Emphasized(Vec<EntryPiece>),
Strong(Vec<EntryPiece>),
Link {
address: String,
content: Vec<EntryPiece>,
},
}Expand description
One part of the content of a citation entry that a citation provider
builds with ProviderCx::build_entry: characters, FLM source, or a
group of parts with a meaning (emphasis, strong importance, a link).
Each group is written as the command of the feature that owns its
meaning: \emph and \textbf (the textstyles feature), \href (the
href feature). A citation entry built from parts is therefore shown on
every output exactly as the same content written in FLM. A group whose
command the registry’s language does not define shows its content alone.
New kinds of parts may be added.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Text(String)
Characters, shown exactly as they are, % and \ included.
Source(Arc<FlmSource>)
FLM source, parsed as inline content under the registry’s language, as
ProviderCx::parse_entry parses it: a formula in a title.
Emphasized(Vec<EntryPiece>)
Emphasized content (\emph).
Strong(Vec<EntryPiece>)
Content of strong importance, set in bold (\textbf).
Link
A link to address around content (\href). The address is passed on
unchanged; the feature that owns links decides what each output does
with it.
Fields
content: Vec<EntryPiece>What the link shows.
Implementations§
Source§impl EntryPiece
impl EntryPiece
Sourcepub fn text(text: impl Into<String>) -> EntryPiece
pub fn text(text: impl Into<String>) -> EntryPiece
Creates a part of characters: EntryPiece::Text(text.into()).
Trait Implementations§
Source§impl Clone for EntryPiece
impl Clone for EntryPiece
Auto Trait Implementations§
impl Forget for EntryPiece
impl Freeze for EntryPiece
impl Move for EntryPiece
impl RefUnwindSafe for EntryPiece
impl Send for EntryPiece
impl Sync for EntryPiece
impl Unpin for EntryPiece
impl UnsafeUnpin for EntryPiece
impl UnwindSafe for EntryPiece
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