pub struct ReadOptions {
pub language_hint: Option<String>,
pub strict: bool,
pub attach_provenance: bool,
}Expand description
Read behavior options for crate::Codec file-loading APIs.
Fields§
§language_hint: Option<String>Optional language hint applied to all loaded resources.
strict: boolEnables stricter checks (e.g., language is required for single-language formats).
attach_provenance: boolWhether to record source provenance fields in metadata.custom.
Implementations§
Source§impl ReadOptions
impl ReadOptions
Sourcepub fn with_language_hint(self, language_hint: Option<String>) -> Self
pub fn with_language_hint(self, language_hint: Option<String>) -> Self
Sets a language hint.
Sourcepub fn with_strict(self, strict: bool) -> Self
pub fn with_strict(self, strict: bool) -> Self
Enables/disables strict mode.
Sourcepub fn with_provenance(self, attach_provenance: bool) -> Self
pub fn with_provenance(self, attach_provenance: bool) -> Self
Enables/disables provenance capture.
Trait Implementations§
Source§impl Clone for ReadOptions
impl Clone for ReadOptions
Source§fn clone(&self) -> ReadOptions
fn clone(&self) -> ReadOptions
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 ReadOptions
impl Debug for ReadOptions
Source§impl Default for ReadOptions
impl Default for ReadOptions
Source§fn default() -> ReadOptions
fn default() -> ReadOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for ReadOptions
impl PartialEq for ReadOptions
impl Eq for ReadOptions
impl StructuralPartialEq for ReadOptions
Auto Trait Implementations§
impl Freeze 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