#[non_exhaustive]pub enum LineError {
#[non_exhaustive] Invalid {
reason: String,
},
Overlong,
}Expand description
What Lines::next_message found wrong.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
#[non_exhaustive]Invalid
A line that is not a message (not valid JSON, or a known type with wrong fields). The line is dropped; the following ones still read.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Overlong
A line longer than MAX_SERVER_LINE: everything pushed so far is dropped. That is no
smed; close the connection.
Trait Implementations§
impl Eq for LineError
Source§impl Error for LineError
impl Error for LineError
1.30.0 · 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<LineError> for Error
As InvalidData, with the LineError inside (get_ref and downcast_ref give it back).
impl From<LineError> for Error
As InvalidData, with the LineError inside (get_ref and downcast_ref give it back).
impl StructuralPartialEq for LineError
Auto Trait Implementations§
impl Forget for LineError
impl Freeze for LineError
impl Move for LineError
impl RefUnwindSafe for LineError
impl Send for LineErrorwhere
RawVecInner: Send,
impl Sync for LineErrorwhere
RawVecInner: Sync,
impl Unpin for LineError
impl UnsafeUnpin for LineError
impl UnwindSafe for LineErrorwhere
RawVecInner: UnwindSafe,
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