pub enum Trailing {
Strict,
Newline,
Stop,
}Expand description
Controls what may follow a value.
Variants§
Strict
Only whitespace may follow the value.
This is the default. Anything else after the value is an error.
Newline
Every value is on a line of its own (JSON Lines, also known as NDJSON).
Only whitespace may follow a value on its line, the next line holds
the next value. Lines that only contain whitespace are skipped.
Errors are contained to their line: if a line fails to deserialize
(even if it’s malformed) the next call to
Deserializer::deserialize continues with the next line.
Stop
Parsing stops after the value, regardless of what follows.
The data after the value is not looked at. The next call to
Deserializer::deserialize continues after the value (see
Deserializer::offset), which also reads concatenated JSON.
Trait Implementations§
impl Copy for Trailing
impl Eq for Trailing
impl StructuralPartialEq for Trailing
Auto Trait Implementations§
impl Freeze for Trailing
impl RefUnwindSafe for Trailing
impl Send for Trailing
impl Sync for Trailing
impl Unpin for Trailing
impl UnsafeUnpin for Trailing
impl UnwindSafe for Trailing
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