#[non_exhaustive]pub enum KafkaUuidError {
TooLong {
prefix: String,
},
WrongLength {
input: String,
decoded_len: usize,
},
TooShort,
IllegalCharacter {
byte: u8,
},
WrongEndingUnit,
LastUnitTooShort,
IncorrectEndingByte {
position: usize,
},
Hyphenated {
input: String,
source: Error,
},
}Expand description
A string that is not a valid KafkaUuid.
Each message is the message of the IllegalArgumentException that
Kafka’s Uuid.fromString throws for the same input. Kafka passes the
messages of java.util.Base64 through unchanged, so some of them name a
byte array.
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.
TooLong
The input is longer than 24 UTF-16 code units.
WrongLength
The input is valid base64url, but not of 16 bytes.
TooShort
The input is a single character.
IllegalCharacter
The input holds a byte that is not in the base64url alphabet.
WrongEndingUnit
A = is in a position where base64 does not allow padding.
LastUnitTooShort
The last base64 unit has only one character.
IncorrectEndingByte
Bytes follow the padding.
Hyphenated
The input has the shape of the hyphenated hex form but is not valid
hex. Only KafkaUuid::parse_kafka_or_hyphenated returns it.
Trait Implementations§
Source§impl Clone for KafkaUuidError
impl Clone for KafkaUuidError
Source§fn clone(&self) -> KafkaUuidError
fn clone(&self) -> KafkaUuidError
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 moreSource§impl Debug for KafkaUuidError
impl Debug for KafkaUuidError
Source§impl Display for KafkaUuidError
impl Display for KafkaUuidError
impl Eq for KafkaUuidError
Source§impl Error for KafkaUuidError
impl Error for KafkaUuidError
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 PartialEq for KafkaUuidError
impl PartialEq for KafkaUuidError
Source§fn eq(&self, other: &KafkaUuidError) -> bool
fn eq(&self, other: &KafkaUuidError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for KafkaUuidError
Auto Trait Implementations§
impl Freeze for KafkaUuidError
impl RefUnwindSafe for KafkaUuidError
impl Send for KafkaUuidError
impl Sync for KafkaUuidError
impl Unpin for KafkaUuidError
impl UnsafeUnpin for KafkaUuidError
impl UnwindSafe for KafkaUuidError
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