pub enum SynxlStreamError {
Format(SynxlError),
Io(Error),
}Expand description
What can go wrong while streaming from an [io::BufRead].
The two arms are kept apart deliberately: a SynxlError says the document
is malformed and is the same verdict every conforming implementation must
reach, while an [io::Error] says nothing about the document at all — the
disk, socket, or pipe failed. Folding the second into the first would make
a transient network hiccup indistinguishable from a spec violation.
Variants§
Format(SynxlError)
A §11.1 hard error in the document.
Io(Error)
The underlying reader failed, or produced bytes that are not UTF-8 (§3.1).
Implementations§
Trait Implementations§
Source§impl Debug for SynxlStreamError
impl Debug for SynxlStreamError
Source§impl Display for SynxlStreamError
impl Display for SynxlStreamError
Source§impl Error for SynxlStreamError
impl Error for SynxlStreamError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for SynxlStreamError
impl From<Error> for SynxlStreamError
Source§fn from(e: Error) -> SynxlStreamError
fn from(e: Error) -> SynxlStreamError
Converts to this type from the input type.
Source§impl From<SynxlError> for SynxlStreamError
impl From<SynxlError> for SynxlStreamError
Source§fn from(e: SynxlError) -> SynxlStreamError
fn from(e: SynxlError) -> SynxlStreamError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SynxlStreamError
impl !UnwindSafe for SynxlStreamError
impl Freeze for SynxlStreamError
impl Send for SynxlStreamError
impl Sync for SynxlStreamError
impl Unpin for SynxlStreamError
impl UnsafeUnpin for SynxlStreamError
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