#[non_exhaustive]pub enum Error {
LengthOverflow,
LengthMismatch,
MismatchedArrayLengths,
MissingNulTerminator,
EmptyFixedLengthString,
Windows(u32),
}Expand description
An error reported while registering a provider or writing an event.
Every variant maps to a Win32 error code through Error::win32_code, so an error can still
be reported through interfaces that expect one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LengthOverflow
A derived length does not fit in the integer type of the field that carries it.
LengthMismatch
An encoded value’s length does not match the length declared by another field.
MismatchedArrayLengths
Array elements sharing a single length field have differing lengths.
MissingNulTerminator
A string field is missing its NUL terminator.
EmptyFixedLengthString
A fixed-length string field has no room for a NUL terminator.
Windows(u32)
A Windows API call failed with this Win32 error code.
Implementations§
Source§impl Error
impl Error
Sourcepub const fn win32_code(&self) -> u32
pub const fn win32_code(&self) -> u32
Returns the Win32 error code that corresponds to this error.
Error::LengthOverflow maps to ERROR_ARITHMETIC_OVERFLOW; the other input validation
failures map to ERROR_INVALID_DATA.
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()