pub struct MarginOptions {
pub background_threshold: u8,
pub min_margin: u32,
pub default_trim_percent: f32,
pub edge_sensitivity: f32,
pub detection_mode: ContentDetectionMode,
}Expand description
Margin detection options
Fields§
§background_threshold: u8Background color threshold (0-255)
min_margin: u32Minimum margin in pixels
default_trim_percent: f32Default trim percentage
edge_sensitivity: f32Edge detection sensitivity
detection_mode: ContentDetectionModeContent detection mode
Implementations§
Source§impl MarginOptions
impl MarginOptions
Sourcepub fn builder() -> MarginOptionsBuilder
pub fn builder() -> MarginOptionsBuilder
Create a new options builder
Sourcepub fn for_dark_background() -> Self
pub fn for_dark_background() -> Self
Create options for dark backgrounds (e.g., scanned old books)
Trait Implementations§
Source§impl Clone for MarginOptions
impl Clone for MarginOptions
Source§fn clone(&self) -> MarginOptions
fn clone(&self) -> MarginOptions
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 moreSource§impl Debug for MarginOptions
impl Debug for MarginOptions
Auto Trait Implementations§
impl Freeze for MarginOptions
impl RefUnwindSafe for MarginOptions
impl Send for MarginOptions
impl Sync for MarginOptions
impl Unpin for MarginOptions
impl UnwindSafe for MarginOptions
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().