pub struct PlainTextPassthrough;Expand description
Passthrough for text-native formats.
Reads the source as plain text and applies normalize_text. It
parses nothing and strips no markup. Input encoding is UTF-8, or
UTF-16 behind a required byte order mark: a leading FF FE
decodes as UTF-16LE and FE FF as UTF-16BE, the mark is consumed
before decoding, and the outcome carries a transcoding warning. A
UTF-32 mark fails closed with reason unsupported-encoding, an
odd trailing byte or unpaired surrogate fails with invalid_utf16
naming the byte offset, and a file with no mark must be valid
UTF-8. A leading UTF-8 byte order mark is stripped with a warning.
A NUL scalar anywhere in the decoded text fails closed with reason
nul_bytes, because text-native content never holds one and the
usual culprit is a BOM-less UTF-16 export.
Trait Implementations§
Source§impl Converter for PlainTextPassthrough
impl Converter for PlainTextPassthrough
Auto Trait Implementations§
impl Freeze for PlainTextPassthrough
impl RefUnwindSafe for PlainTextPassthrough
impl Send for PlainTextPassthrough
impl Sync for PlainTextPassthrough
impl Unpin for PlainTextPassthrough
impl UnsafeUnpin for PlainTextPassthrough
impl UnwindSafe for PlainTextPassthrough
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more