pub struct Options {
    pub accept_truncated_surrogate_pair: bool,
    pub accept_invalid_codepoints: bool,
}
Expand description

Parser options.

Fields

accept_truncated_surrogate_pair: bool

Whether or not to accept a high surrogate without its low counterpart in strings.

In such instance, the high surrogate will be replaced with the Unicode REPLACEMENT CHARACTER, U+FFFD.

accept_invalid_codepoints: bool

Whether or not to accept invalid Unicode codepoints in strings.

Invalid codepoints will be replaced with the Unicode REPLACEMENT CHARACTER, U+FFFD.

Implementations

Strict mode.

All options are set to false.

Flexible mode.

All options are set to true.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Wraps self inside a Loc<Self, F> using the given location. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.