pub struct NormalizingJsonDecodePolicyBuilder { /* private fields */ }Expand description
Builder for NormalizingJsonDecodePolicy.
§Examples
use qubit_json::decode::NormalizingJsonDecodePolicyBuilder;
let policy = NormalizingJsonDecodePolicyBuilder::new()
.strip_utf8_bom(false)
.build();
assert!(!policy.strip_utf8_bom());Implementations§
Source§impl NormalizingJsonDecodePolicyBuilder
impl NormalizingJsonDecodePolicyBuilder
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a builder initialized with the lenient policy.
§Returns
A builder ready for selective policy customization.
Sourcepub const fn trim_whitespace(self, enabled: bool) -> Self
pub const fn trim_whitespace(self, enabled: bool) -> Self
Sourcepub const fn strip_utf8_bom(self, enabled: bool) -> Self
pub const fn strip_utf8_bom(self, enabled: bool) -> Self
Sourcepub const fn markdown_fence_policy(self, policy: MarkdownFencePolicy) -> Self
pub const fn markdown_fence_policy(self, policy: MarkdownFencePolicy) -> Self
Sourcepub const fn escape_control_chars_in_strings(self, enabled: bool) -> Self
pub const fn escape_control_chars_in_strings(self, enabled: bool) -> Self
Sourcepub const fn diagnostic_policy(self, policy: DiagnosticPolicy) -> Self
pub const fn diagnostic_policy(self, policy: DiagnosticPolicy) -> Self
Sourcepub const fn build(self) -> NormalizingJsonDecodePolicy
pub const fn build(self) -> NormalizingJsonDecodePolicy
Builds the configured policy.
§Returns
An immutable normalization policy containing all settings selected on this builder.
Trait Implementations§
Source§impl Clone for NormalizingJsonDecodePolicyBuilder
impl Clone for NormalizingJsonDecodePolicyBuilder
Source§fn clone(&self) -> NormalizingJsonDecodePolicyBuilder
fn clone(&self) -> NormalizingJsonDecodePolicyBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Eq for NormalizingJsonDecodePolicyBuilder
impl StructuralPartialEq for NormalizingJsonDecodePolicyBuilder
Auto Trait Implementations§
impl Freeze for NormalizingJsonDecodePolicyBuilder
impl RefUnwindSafe for NormalizingJsonDecodePolicyBuilder
impl Send for NormalizingJsonDecodePolicyBuilder
impl Sync for NormalizingJsonDecodePolicyBuilder
impl Unpin for NormalizingJsonDecodePolicyBuilder
impl UnsafeUnpin for NormalizingJsonDecodePolicyBuilder
impl UnwindSafe for NormalizingJsonDecodePolicyBuilder
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