pub enum HrefCommand {
Href,
Url,
Email,
}Expand description
The command with which a link is written: \href, \url or \email.
An HrefCommand is the data of each element value of LINK_ELEMENT. A
lowering rule reads it from a node with element_value. The methods of
HrefCommand return the properties of the command that a lowering rule needs:
whether the command has a text argument (has_text), and the
prefix of the link target (prefix). A lowering rule therefore
does not need to compare the names of the commands.
Variants§
Href
The command \href{address}{text}. The link shows text.
Url
The command \url{address}. The link shows the display of the address
(display).
The command \email{address}. The link points to mailto: followed by
the address, and shows the address.
Implementations§
Source§impl HrefCommand
impl HrefCommand
Sourcepub const ALL: [HrefCommand; 3]
pub const ALL: [HrefCommand; 3]
The three commands, in the order \href, \url, \email.
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
Returns the command’s name, without the backslash: href, url,
email.
Trait Implementations§
Source§impl ApartFromText for HrefCommand
Excludes the address argument ADDRESS_ARG of a link from the plain text of
the content around the link (plain_text_of).
impl ApartFromText for HrefCommand
Excludes the address argument ADDRESS_ARG of a link from the plain text of
the content around the link (plain_text_of).
For instance, when the identifier of a heading is computed from its title, the
address of a link in the title is left out. The text argument of \href is
part of the plain text. The display of a \url or an \email is computed
only when the link is lowered, so it is not part of the plain text either.
Source§fn apart_from_text(&self, _node: &NodeRef<'_, Flm>) -> Vec<ContentRef>
fn apart_from_text(&self, _node: &NodeRef<'_, Flm>) -> Vec<ContentRef>
node.Source§impl Clone for HrefCommand
impl Clone for HrefCommand
impl Copy for HrefCommand
Source§impl Debug for HrefCommand
impl Debug for HrefCommand
impl Eq for HrefCommand
Source§impl PartialEq for HrefCommand
impl PartialEq for HrefCommand
impl StructuralPartialEq for HrefCommand
Auto Trait Implementations§
impl Forget for HrefCommand
impl Freeze for HrefCommand
impl Move for HrefCommand
impl RefUnwindSafe for HrefCommand
impl Send for HrefCommand
impl Sync for HrefCommand
impl Unpin for HrefCommand
impl UnsafeUnpin for HrefCommand
impl UnwindSafe for HrefCommand
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<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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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