pub enum ReferenceType {
ToCome {
identifier: Option<String>,
},
Citation(CitationData),
AnnotationReference {
label: String,
},
FootnoteNumber {
number: u32,
},
Session {
target: String,
},
Url {
target: String,
},
File {
target: String,
},
General {
target: String,
},
NotSure,
}Expand description
Reference type classification derived from its content.
Variants§
ToCome
[TK] or [TK-identifier]
Citation(CitationData)
[@citation] with structured citation data.
AnnotationReference
[::note] — pointer to an annotation by label.
FootnoteNumber
[12]
Session
[#42]
Url
[https://example.com]
File
[./file.txt]
General
[Introduction] or other document references.
NotSure
Unable to classify.
Implementations§
Source§impl ReferenceType
impl ReferenceType
Sourcepub fn anchoring(&self) -> AnchorKind
pub fn anchoring(&self) -> AnchorKind
Classify this reference type’s anchoring capability, per §2.3.4.
Link-like types (Url, File, Session, General) render as a span
of linked text and are therefore AnchorKind::WholeLineCapable.
Marker-style types (FootnoteNumber, Citation, AnnotationReference)
render as markers/superscripts and are AnchorKind::MarkerOnly. The
unclassified placeholders (ToCome, NotSure) are treated as
MarkerOnly: a [TK] placeholder has no destination to link and an
unclassifiable reference must not silently consume a whole element.
Trait Implementations§
Source§impl Clone for ReferenceType
impl Clone for ReferenceType
Source§fn clone(&self) -> ReferenceType
fn clone(&self) -> ReferenceType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReferenceType
impl Debug for ReferenceType
Source§impl PartialEq for ReferenceType
impl PartialEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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