pub enum ReferenceType {
Show 13 variants
WikipediaUrl,
WikidataUrl,
DbpediaUrl,
WebUrl,
AcademicCitation,
Doi,
Arxiv,
CrossReference,
FootnoteMarker,
Isbn,
SocialHandle,
Hashtag,
Unknown,
}Expand description
Type of reference detected in text.
Variants§
WikipediaUrl
Wikipedia URL
WikidataUrl
Wikidata entity URL (Q-number)
DbpediaUrl
DBpedia resource URL
WebUrl
General HTTP/HTTPS URL
AcademicCitation
Academic citation (Author et al., Year)
Doi
DOI reference
Arxiv
ArXiv reference
CrossReference
Internal cross-reference (Section, Figure, Table)
FootnoteMarker
Footnote/endnote marker
Isbn
ISBN reference
SocialHandle
Social media handle (@username)
Hashtag
Hashtag (#topic)
Unknown
Unknown reference type
Implementations§
Source§impl ReferenceType
impl ReferenceType
Sourcepub fn is_resolvable(&self) -> bool
pub fn is_resolvable(&self) -> bool
Check if this reference type can be resolved to external content.
Sourcepub fn is_kb_link(&self) -> bool
pub fn is_kb_link(&self) -> bool
Check if this reference links to a knowledge base.
Trait Implementations§
Source§impl Clone for ReferenceType
impl Clone for ReferenceType
Source§fn clone(&self) -> ReferenceType
fn clone(&self) -> ReferenceType
Returns a duplicate 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 Debug for ReferenceType
impl Debug for ReferenceType
Source§impl Default for ReferenceType
impl Default for ReferenceType
Source§fn default() -> ReferenceType
fn default() -> ReferenceType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ReferenceType
impl<'de> Deserialize<'de> for ReferenceType
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 Hash for ReferenceType
impl Hash for ReferenceType
Source§impl PartialEq for ReferenceType
impl PartialEq for ReferenceType
Source§impl Serialize for ReferenceType
impl Serialize for ReferenceType
impl Eq for ReferenceType
impl StructuralPartialEq for ReferenceType
Auto Trait Implementations§
impl Freeze for ReferenceType
impl RefUnwindSafe for ReferenceType
impl Send for ReferenceType
impl Sync for ReferenceType
impl Unpin for ReferenceType
impl UnsafeUnpin for ReferenceType
impl UnwindSafe for ReferenceType
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
Mutably borrows from an owned value. Read more
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§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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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