pub enum ContentRole {
Heading {
level: u8,
},
Paragraph,
ListItem {
label: Option<String>,
},
TableCell {
row: usize,
col: usize,
is_header: bool,
},
Figure {
alt_text: Option<String>,
},
Caption,
Code,
BlockQuote,
Link {
url: Option<String>,
},
Other(String),
}Expand description
The semantic role of an extracted content block.
Variants§
Heading
A heading at the given level (1-6).
Paragraph
A paragraph of body text.
ListItem
A list item, optionally with its label (bullet, number, etc.).
TableCell
A table cell at the given row and column.
Figure
A figure or image, optionally with alternative text.
Caption
A caption for a figure or table.
Code
A code block.
BlockQuote
A block quote.
Link
A link with optional URL.
Other(String)
Any other role not covered above.
Trait Implementations§
Source§impl Clone for ContentRole
impl Clone for ContentRole
Source§fn clone(&self) -> ContentRole
fn clone(&self) -> ContentRole
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContentRole
impl Debug for ContentRole
Source§impl PartialEq for ContentRole
impl PartialEq for ContentRole
impl StructuralPartialEq for ContentRole
Auto Trait Implementations§
impl Freeze for ContentRole
impl RefUnwindSafe for ContentRole
impl Send for ContentRole
impl Sync for ContentRole
impl Unpin for ContentRole
impl UnsafeUnpin for ContentRole
impl UnwindSafe for ContentRole
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<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