pub struct Abstract {
pub abstract_type: Option<String>,
pub text: String,
pub sections: Vec<AbstractSection>,
}Expand description
Abstract.
Maps to JATS <abstract>. The DTD allows multiple abstracts
distinguished by @abstract-type.
Fields§
§abstract_type: Option<String>Abstract type (e.g., “graphical”, “teaser”). From <abstract abstract-type="...">.
text: StringPlain abstract text (flattened). Concatenation of all <p> texts.
sections: Vec<AbstractSection>Structured abstract sections. From <abstract>/<sec>.
Present when the abstract has labeled sections (e.g., Background, Methods, Results).
Implementations§
Source§impl Abstract
impl Abstract
Sourcepub fn is_structured(&self) -> bool
pub fn is_structured(&self) -> bool
Whether this abstract has labeled/structured sections.
Sourcepub fn section_by_label(&self, label: &str) -> Option<&AbstractSection>
pub fn section_by_label(&self, label: &str) -> Option<&AbstractSection>
Find a structured abstract section by label (case-insensitive match).
Returns the first section whose label equals label ignoring case, e.g.
abstract.section_by_label("methods").
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Abstract
impl<'de> Deserialize<'de> for Abstract
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Abstract, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Abstract, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Abstract
impl Serialize for Abstract
Source§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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Abstract
Auto Trait Implementations§
impl Freeze for Abstract
impl RefUnwindSafe for Abstract
impl Send for Abstract
impl Sync for Abstract
impl Unpin for Abstract
impl UnwindSafe for Abstract
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