pub struct EncodingConfig {
pub encoding: Encoding,
pub error_handling: EncodingErrorHandling,
pub normalize_line_endings: bool,
}Expand description
Configuration for text encoding.
Fields§
§encoding: EncodingThe encoding to use (default: UTF-8).
error_handling: EncodingErrorHandlingHow to handle invalid sequences.
normalize_line_endings: boolWhether to normalize line endings.
Implementations§
Source§impl EncodingConfig
impl EncodingConfig
Sourcepub const fn error_handling(self, mode: EncodingErrorHandling) -> Self
pub const fn error_handling(self, mode: EncodingErrorHandling) -> Self
Set the error handling mode.
Sourcepub const fn normalize_line_endings(self, normalize: bool) -> Self
pub const fn normalize_line_endings(self, normalize: bool) -> Self
Set whether to normalize line endings.
Trait Implementations§
Source§impl Clone for EncodingConfig
impl Clone for EncodingConfig
Source§fn clone(&self) -> EncodingConfig
fn clone(&self) -> EncodingConfig
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 EncodingConfig
impl Debug for EncodingConfig
Auto Trait Implementations§
impl Freeze for EncodingConfig
impl RefUnwindSafe for EncodingConfig
impl Send for EncodingConfig
impl Sync for EncodingConfig
impl Unpin for EncodingConfig
impl UnwindSafe for EncodingConfig
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