#[non_exhaustive]pub struct ReadOptions {
pub limits: Limits,
pub keep_raw: bool,
pub fallback_codepage: Option<String>,
}Expand description
Options accepted by every reader.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.limits: LimitsResource limits.
keep_raw: boolKeep original record bytes in crate::Entity::raw.
fallback_codepage: Option<String>Code page (WHATWG label, e.g. "windows-1254") for 8-bit text when the file does not
declare one. None uses the reader’s default (windows-1252).
Implementations§
Source§impl ReadOptions
impl ReadOptions
Sourcepub fn with_limits(self, limits: Limits) -> Self
pub fn with_limits(self, limits: Limits) -> Self
Overrides the resource Limits.
Sourcepub fn with_keep_raw(self, keep_raw: bool) -> Self
pub fn with_keep_raw(self, keep_raw: bool) -> Self
Configures whether original native record bytes are retained in crate::Entity::raw.
Sourcepub fn with_fallback_codepage(self, codepage: impl Into<String>) -> Self
pub fn with_fallback_codepage(self, codepage: impl Into<String>) -> Self
Sets the fallback 8-bit code page label (for example "windows-1254" or "cp857").
Trait Implementations§
Source§impl Clone for ReadOptions
impl Clone for ReadOptions
Source§impl Debug for ReadOptions
impl Debug for ReadOptions
Source§impl Default for ReadOptions
impl Default for ReadOptions
Source§impl<'de> Deserialize<'de> for ReadOptionswhere
ReadOptions: Default,
impl<'de> Deserialize<'de> for ReadOptionswhere
ReadOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ReadOptions
impl PartialEq for ReadOptions
Source§impl Serialize for ReadOptions
impl Serialize for ReadOptions
impl StructuralPartialEq for ReadOptions
Auto Trait Implementations§
impl Forget for ReadOptions
impl Freeze for ReadOptions
impl Move for ReadOptions
impl RefUnwindSafe for ReadOptions
impl Send for ReadOptions
impl Sync for ReadOptions
impl Unpin for ReadOptions
impl UnsafeUnpin for ReadOptions
impl UnwindSafe for ReadOptions
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