pub struct ContentLayers {
pub body: bool,
pub furniture: bool,
pub notes: bool,
pub invisible: bool,
}Expand description
A set of content layers, body included — docling-core’s
set[ContentLayer] (HTMLParams.layers,
export_to_html(included_content_layers=…)), where body is a member
like any other. Default is docling’s DEFAULT_CONTENT_LAYERS: body
only, so an export built with it is unchanged from before layers could
be chosen (#499).
Fields§
§body: boolThe main content (items without an explicit layer).
furniture: boolContentLayer::Furniture: page headers/footers, navigation chrome.
notes: boolContentLayer::Notes: reviewer comments and other editorial notes.
invisible: boolContentLayer::Invisible: hidden content (hidden sheets, …).
Implementations§
Source§impl ContentLayers
impl ContentLayers
Sourcepub const BODY: ContentLayers
pub const BODY: ContentLayers
Body only — docling’s DEFAULT_CONTENT_LAYERS.
Sourcepub const ALL: ContentLayers
pub const ALL: ContentLayers
Every layer — Python’s set(ContentLayer).
Sourcepub const NONE: ContentLayers
pub const NONE: ContentLayers
Sourcepub const fn with(self, layer: ContentLayer) -> ContentLayers
pub const fn with(self, layer: ContentLayer) -> ContentLayers
The set plus layer.
Sourcepub const fn with_body(self) -> ContentLayers
pub const fn with_body(self) -> ContentLayers
The set plus the body layer.
Sourcepub fn contains(&self, layer: Option<ContentLayer>) -> bool
pub fn contains(&self, layer: Option<ContentLayer>) -> bool
Whether layer is in the set; None is the body layer.
Sourcepub fn contains_name(&self, name: &str) -> bool
pub fn contains_name(&self, name: &str) -> bool
Whether the layer spelled name (body, furniture, notes,
invisible — the JSON content_layer values) is in the set; an
unknown name is not.
Sourcepub fn parse_list(list: &str) -> Result<ContentLayers, String>
pub fn parse_list(list: &str) -> Result<ContentLayers, String>
Parse a comma-separated list of layer names (body,furniture;
whitespace around a name is ignored, all is every layer). An
unknown name is the error. docling-core 2.99’s background layer
(watermarks) has no items in this model, so the name is accepted and
adds nothing — a set written for Python keeps parsing.
Trait Implementations§
Source§impl Clone for ContentLayers
impl Clone for ContentLayers
Source§fn clone(&self) -> ContentLayers
fn clone(&self) -> ContentLayers
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ContentLayers
Source§impl Debug for ContentLayers
impl Debug for ContentLayers
Source§impl Default for ContentLayers
impl Default for ContentLayers
Source§fn default() -> ContentLayers
fn default() -> ContentLayers
impl Eq for ContentLayers
Source§impl Hash for ContentLayers
impl Hash for ContentLayers
Source§impl PartialEq for ContentLayers
impl PartialEq for ContentLayers
impl StructuralPartialEq for ContentLayers
Auto Trait Implementations§
impl Freeze for ContentLayers
impl RefUnwindSafe for ContentLayers
impl Send for ContentLayers
impl Sync for ContentLayers
impl Unpin for ContentLayers
impl UnsafeUnpin for ContentLayers
impl UnwindSafe for ContentLayers
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().