pub struct PapyrusBuilder { /* private fields */ }Expand description
Builder for Papyrus.
All settings have sensible defaults via DetectorConfig::default; only
set the values you want to override.
Implementations§
Source§impl PapyrusBuilder
impl PapyrusBuilder
Sourcepub fn heading_size_ratio(self, ratio: f32) -> Self
pub fn heading_size_ratio(self, ratio: f32) -> Self
Minimum font-size ratio over the computed body size to treat a segment
as a heading. Must be less than 1.4 (the fixed level-3 boundary).
Default: 1.2.
Sourcepub fn detect_bold(self, enabled: bool) -> Self
pub fn detect_bold(self, enabled: bool) -> Self
Enable or disable bold detection from font name / descriptor metrics.
When false, all spans have bold = false. Default: true.
Sourcepub fn detect_italic(self, enabled: bool) -> Self
pub fn detect_italic(self, enabled: bool) -> Self
Enable or disable italic detection from font name / descriptor metrics.
When false, all spans have italic = false. Default: true.
Trait Implementations§
Source§impl Clone for PapyrusBuilder
impl Clone for PapyrusBuilder
Source§fn clone(&self) -> PapyrusBuilder
fn clone(&self) -> PapyrusBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PapyrusBuilder
impl RefUnwindSafe for PapyrusBuilder
impl Send for PapyrusBuilder
impl Sync for PapyrusBuilder
impl Unpin for PapyrusBuilder
impl UnsafeUnpin for PapyrusBuilder
impl UnwindSafe for PapyrusBuilder
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