pub struct DetectOptions {
pub encoding_era: u8,
pub max_bytes: usize,
pub prefer_superset: bool,
pub compat_names: bool,
pub include_encodings: Option<Vec<String>>,
pub exclude_encodings: Option<Vec<String>>,
pub no_match_encoding: String,
pub empty_input_encoding: String,
pub ignore_threshold: bool,
}Expand description
Public options for detect and detect_all.
Fields§
§encoding_era: u8§max_bytes: usize§prefer_superset: bool§compat_names: boolReturn chardet 5.x/6.x compatible encoding names (default true).
include_encodings: Option<Vec<String>>If given, only these encodings are considered (names or aliases).
exclude_encodings: Option<Vec<String>>If given, these encodings are removed from the candidate set.
no_match_encoding: StringEncoding returned when no candidate survives (default cp1252).
empty_input_encoding: StringEncoding returned for empty input (default utf-8).
ignore_threshold: boolWhen true, detect_all keeps every candidate regardless of confidence.
Trait Implementations§
Source§impl Clone for DetectOptions
impl Clone for DetectOptions
Auto Trait Implementations§
impl Freeze for DetectOptions
impl RefUnwindSafe for DetectOptions
impl Send for DetectOptions
impl Sync for DetectOptions
impl Unpin for DetectOptions
impl UnsafeUnpin for DetectOptions
impl UnwindSafe for DetectOptions
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