Enum SectionKind
pub enum SectionKind {
Show 13 variants
Introduction,
Methods,
Results,
ResultsDiscussion,
Discussion,
Conclusions,
Abstract,
Background,
CaseStudy,
SupplementaryMaterial,
DataAvailability,
Other(String),
Unspecified,
}Expand description
Semantic classification of a JATS <sec sec-type="..."> value.
The DTD leaves @sec-type open-ended, but the NLM/PMC tagging guidelines use
a recognized vocabulary for the standard parts of a research article (IMRaD
and friends). This enum maps those well-known values to type-safe variants so
text-mining pipelines can match on section role without string juggling,
while preserving any unrecognized value via SectionKind::Other.
Use Section::kind to obtain this from a section.
Variants§
Introduction
intro / introduction.
Methods
methods / materials / materials|methods / methods|materials.
Results
results.
ResultsDiscussion
results|discussion.
Discussion
discussion.
Conclusions
conclusions.
Abstract
abstract.
Background
background.
CaseStudy
cases / case / case-report.
SupplementaryMaterial
supplementary-material.
DataAvailability
data-availability.
Other(String)
A sec-type that is present but not one of the recognized values.
Unspecified
No sec-type attribute was present on the section.
Implementations§
§impl SectionKind
impl SectionKind
pub fn from_sec_type(sec_type: Option<&str>) -> SectionKind
pub fn from_sec_type(sec_type: Option<&str>) -> SectionKind
Classify a raw sec-type attribute value.
Matching is case-insensitive and tolerant of the | separator that JATS
uses for combined sections (e.g. materials|methods).
Trait Implementations§
§impl Clone for SectionKind
impl Clone for SectionKind
§fn clone(&self) -> SectionKind
fn clone(&self) -> SectionKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SectionKind
impl Debug for SectionKind
§impl<'de> Deserialize<'de> for SectionKind
impl<'de> Deserialize<'de> for SectionKind
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SectionKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SectionKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for SectionKind
impl PartialEq for SectionKind
§impl Serialize for SectionKind
impl Serialize for SectionKind
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for SectionKind
impl StructuralPartialEq for SectionKind
Auto Trait Implementations§
impl Freeze for SectionKind
impl RefUnwindSafe for SectionKind
impl Send for SectionKind
impl Sync for SectionKind
impl Unpin for SectionKind
impl UnwindSafe for SectionKind
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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