pub enum ConfigError {
InvalidKey,
KeyStartsWithEquals,
UnexpectedEnd,
LengthOverflow,
BufferTooSmall,
InvalidUtf8,
}Expand description
Configuration-specific error types.
These errors occur during parsing or serialization of DNS-SD TXT record style configuration options.
Variants§
InvalidKey
Invalid key format.
Keys must be:
- Non-empty
- Printable US-ASCII (0x20-0x7E)
- Not contain ‘=’ character
- Contain at least one non-whitespace character
KeyStartsWithEquals
Key starts with ‘=’ which is not allowed.
UnexpectedEnd
Unexpected end of data while parsing.
This occurs when a length byte is present but the corresponding data is missing from the buffer.
LengthOverflow
Length field would overflow buffer.
The length prefix indicates more data than is available in the remaining buffer.
BufferTooSmall
Buffer too small for serialization.
The output buffer does not have enough space for the serialized configuration data.
InvalidUtf8
Invalid UTF-8 in string data.
Configuration strings must be valid UTF-8.
Trait Implementations§
Source§impl Clone for ConfigError
impl Clone for ConfigError
Source§fn clone(&self) -> ConfigError
fn clone(&self) -> ConfigError
Returns a duplicate of the value. Read more
1.0.0 · 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 ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl From<ConfigError> for Error
impl From<ConfigError> for Error
Source§fn from(err: ConfigError) -> Self
fn from(err: ConfigError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ConfigError
impl PartialEq for ConfigError
impl Copy for ConfigError
impl Eq for ConfigError
impl StructuralPartialEq for ConfigError
Auto Trait Implementations§
impl Freeze for ConfigError
impl RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnwindSafe for ConfigError
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