pub enum ParserError {
BufferOverflow,
PacketTooLarge(usize),
InvalidLengthByteIndex,
}Expand description
Erreurs pouvant survenir lors du parsing d’une trame UART.
Variants§
BufferOverflow
Le buffer interne a été dépassé avant la fin d’une trame valide.
Cela indique généralement un protocole mal configuré (longueur trop grande) ou un flux de données corrompu.
PacketTooLarge(usize)
La longueur calculée à partir de l’octet de longueur dépasse
BUFFER_SIZE, ce qui rendrait la trame impossible à stocker.
Contient la longueur calculée.
InvalidLengthByteIndex
L’index de l’octet de longueur (champ index de
PacketLengthStrategy::LengthByte) est supérieur ou égal à
BUFFER_SIZE, ce qui constitue une configuration invalide.
Trait Implementations§
Source§impl Clone for ParserError
impl Clone for ParserError
Source§fn clone(&self) -> ParserError
fn clone(&self) -> ParserError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ParserError
Source§impl Debug for ParserError
impl Debug for ParserError
impl Eq for ParserError
Source§impl PartialEq for ParserError
impl PartialEq for ParserError
Source§fn eq(&self, other: &ParserError) -> bool
fn eq(&self, other: &ParserError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParserError
Auto Trait Implementations§
impl Freeze for ParserError
impl RefUnwindSafe for ParserError
impl Send for ParserError
impl Sync for ParserError
impl Unpin for ParserError
impl UnsafeUnpin for ParserError
impl UnwindSafe for ParserError
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