pub enum EncoderError {
InvalidInput,
InvalidIndex,
InvalidPrefix,
IntegerOverflow,
}
Expand description
Contains error options that can be encountered while performing the encoding of an HPACK header set.
Variants§
InvalidInput
Indicates that the encoder received an invalid ASCII character and is thus unable to perform the (Huffman) encoding. Note that only ASCII characters provided in the HPACK spec should be used.
InvalidIndex
Indicates that an invalid index was provided. According to the HPACK
specification, the index 0
must be treated as an invalid index number.
The first valid number is 1
.
InvalidPrefix
Indicates that an invalid prefix was provided (must be [1, 8]).
IntegerOverflow
Indicates that the value of the integer being encoded exceeds a certain threshold (5 bytes are chosen by this implementation). This can also happen while encoding too long string.
Trait Implementations§
Source§impl Debug for EncoderError
impl Debug for EncoderError
Source§impl Display for EncoderError
impl Display for EncoderError
Source§impl Error for EncoderError
impl Error for EncoderError
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<EncoderError> for EncoderError
impl From<EncoderError> for EncoderError
Source§fn from(err: HuffmanError) -> Self
fn from(err: HuffmanError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EncoderError
impl PartialEq for EncoderError
impl StructuralPartialEq for EncoderError
Auto Trait Implementations§
impl Freeze for EncoderError
impl RefUnwindSafe for EncoderError
impl Send for EncoderError
impl Sync for EncoderError
impl Unpin for EncoderError
impl UnwindSafe for EncoderError
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