#[non_exhaustive]pub struct ContentTypeFlags {
pub has_table: bool,
pub has_list: bool,
pub has_code: bool,
pub heading_only: bool,
}Expand description
Boolean flags describing the kinds of content present in a chunk.
Pipeline output: the chunker derives these from a chunk’s element types;
external consumers read them off ChunkMetadata::content_types. Like the
enclosing ChunkMetadata, this is #[non_exhaustive] so future content
flags (e.g. has_formula, has_footnote) can be added without a breaking
change. To build one outside the crate (e.g. in a test), start from
ContentTypeFlags::default and set the fields you need.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.has_table: boolThe chunk contains at least one table element.
has_list: boolThe chunk contains at least one list item.
has_code: boolThe chunk contains at least one code block.
heading_only: boolThe chunk is composed solely of heading (title) elements.
Trait Implementations§
Source§impl Clone for ContentTypeFlags
impl Clone for ContentTypeFlags
Source§fn clone(&self) -> ContentTypeFlags
fn clone(&self) -> ContentTypeFlags
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 moreimpl Copy for ContentTypeFlags
Source§impl Debug for ContentTypeFlags
impl Debug for ContentTypeFlags
Source§impl Default for ContentTypeFlags
impl Default for ContentTypeFlags
Source§fn default() -> ContentTypeFlags
fn default() -> ContentTypeFlags
Returns the “default value” for a type. Read more
impl Eq for ContentTypeFlags
Source§impl PartialEq for ContentTypeFlags
impl PartialEq for ContentTypeFlags
impl StructuralPartialEq for ContentTypeFlags
Auto Trait Implementations§
impl Freeze for ContentTypeFlags
impl RefUnwindSafe for ContentTypeFlags
impl Send for ContentTypeFlags
impl Sync for ContentTypeFlags
impl Unpin for ContentTypeFlags
impl UnsafeUnpin for ContentTypeFlags
impl UnwindSafe for ContentTypeFlags
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