pub struct TocDetection {
pub found: bool,
pub pages: Vec<usize>,
pub has_page_numbers: bool,
pub confidence: f32,
}Expand description
Result of TOC detection.
Fields§
§found: boolWhether a TOC was found.
pages: Vec<usize>Page numbers where TOC appears.
has_page_numbers: boolWhether the TOC contains page numbers.
confidence: f32Detection confidence (0.0 - 1.0).
Implementations§
Source§impl TocDetection
impl TocDetection
Sourcepub fn with_pages(self, pages: Vec<usize>) -> Self
pub fn with_pages(self, pages: Vec<usize>) -> Self
Set the TOC pages.
Sourcepub fn with_page_numbers(self, has: bool) -> Self
pub fn with_page_numbers(self, has: bool) -> Self
Set whether page numbers are present.
Sourcepub fn with_confidence(self, confidence: f32) -> Self
pub fn with_confidence(self, confidence: f32) -> Self
Set the confidence score.
Trait Implementations§
Source§impl Clone for TocDetection
impl Clone for TocDetection
Source§fn clone(&self) -> TocDetection
fn clone(&self) -> TocDetection
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 TocDetection
impl RefUnwindSafe for TocDetection
impl Send for TocDetection
impl Sync for TocDetection
impl Unpin for TocDetection
impl UnsafeUnpin for TocDetection
impl UnwindSafe for TocDetection
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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