pub enum KnxError {
InvalidAddress(&'static str),
BufferTooShort {
needed: usize,
actual: usize,
},
InvalidFrame(&'static str),
UnsupportedServiceType(u16),
}Expand description
Why this crate refused.
Each variant names a class of refusal and carries only what the caller can
act on: a static reason for the classes with several causes, the 2 counts
for a short read, and the code itself for one this crate does not speak.
Nothing here carries owned data, so the type is as usable without std as
with it.
Variants§
InvalidAddress(&'static str)
Text or parts that do not name an address: a level past the bits it has, a missing part, a part that is not a number, or more parts than the form takes. The reason states which.
BufferTooShort
Input ended before the structure being read does. The read is refused rather than completed from whatever is there.
Fields
InvalidFrame(&'static str)
A frame that is present but not one this crate can read: a length or version octet disagreeing with what it precedes, a field code outside what is modeled, or a telegram whose service and payload contradict each other. The reason states which.
UnsupportedServiceType(u16)
A well-formed KNXnet/IP service code that is outside the set this crate speaks. The code that arrived is carried, because the refusal is about this crate’s scope rather than about the frame being malformed.
Trait Implementations§
impl Eq for KnxError
Source§impl Error for KnxError
Available on crate feature std only.
impl Error for KnxError
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()