pub enum LinkLocation<'a> {
Page(PageRef<'a>),
Url(Cow<'a, str>),
}
Variants§
Page(PageRef<'a>)
This link points to a particular page on a wiki.
Url(Cow<'a, str>)
This link is to a specific URL.
Implementations§
Source§impl<'a> LinkLocation<'a>
impl<'a> LinkLocation<'a>
pub fn parse_interwiki( link: Cow<'a, str>, settings: &WikitextSettings, ) -> Option<(Self, LinkType)>
pub fn parse(link: Cow<'a, str>) -> Self
pub fn parse_extra(link: Cow<'a, str>) -> Option<Cow<'a, str>>
pub fn to_owned(&self) -> LinkLocation<'static>
pub fn link_type(&self) -> LinkType
Trait Implementations§
Source§impl<'a> Clone for LinkLocation<'a>
impl<'a> Clone for LinkLocation<'a>
Source§fn clone(&self) -> LinkLocation<'a>
fn clone(&self) -> LinkLocation<'a>
Returns a copy 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<'a> Debug for LinkLocation<'a>
impl<'a> Debug for LinkLocation<'a>
Source§impl<'de, 'a> Deserialize<'de> for LinkLocation<'a>
impl<'de, 'a> Deserialize<'de> for LinkLocation<'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
Source§impl<'a> Hash for LinkLocation<'a>
impl<'a> Hash for LinkLocation<'a>
Source§impl<'a> PartialEq for LinkLocation<'a>
impl<'a> PartialEq for LinkLocation<'a>
Source§impl<'a> Serialize for LinkLocation<'a>
impl<'a> Serialize for LinkLocation<'a>
impl<'a> Eq for LinkLocation<'a>
impl<'a> StructuralPartialEq for LinkLocation<'a>
Auto Trait Implementations§
impl<'a> Freeze for LinkLocation<'a>
impl<'a> RefUnwindSafe for LinkLocation<'a>
impl<'a> Send for LinkLocation<'a>
impl<'a> Sync for LinkLocation<'a>
impl<'a> Unpin for LinkLocation<'a>
impl<'a> UnwindSafe for LinkLocation<'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<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