pub enum LinkLabel<'a> {
Text(Cow<'a, str>),
Slug(Cow<'a, str>),
Url,
Page,
}
Variants§
Text(Cow<'a, str>)
Custom text link label.
Can be set to any arbitrary value of the input text’s choosing.
Slug(Cow<'a, str>)
Page slug-based link label.
This is set when the link is also the label. The link is pre-normalization but post-category stripping.
For instance:
[[[SCP-001]]]
[[[Ethics Committee Orientation]]]
[[[system: Recent Pages]]]
Url
URL-mirroring link label.
This is where the label is just the same as the URL.
Page
Article title-based link label.
The label for this link is whatever the page’s title is.
Implementations§
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for LinkLabel<'a>
impl<'de, 'a> Deserialize<'de> for LinkLabel<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'a> Eq for LinkLabel<'a>
impl<'a> StructuralPartialEq for LinkLabel<'a>
Auto Trait Implementations§
impl<'a> Freeze for LinkLabel<'a>
impl<'a> RefUnwindSafe for LinkLabel<'a>
impl<'a> Send for LinkLabel<'a>
impl<'a> Sync for LinkLabel<'a>
impl<'a> Unpin for LinkLabel<'a>
impl<'a> UnwindSafe for LinkLabel<'a>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key
and return true
if they are equal.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>
Converts
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>
Converts
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