use core::ops::Range;
use displaydoc::Display;
pub type Result<T, E = NtApiSetError> = core::result::Result<T, E>;
#[derive(Clone, Debug, Display, Eq, PartialEq)]
pub enum NtApiSetError {
ApiSetSectionNotFound,
ApiSetSectionOutOfBounds,
EntryNameOutOfBounds {
name_range: Range<usize>,
entry_offset: usize,
actual: usize,
},
HashEntriesOutOfBounds {
range: Range<usize>,
actual: usize,
},
InvalidMapHeaderSize {
expected: usize,
actual: usize,
},
NamespaceEntriesOutOfBounds {
range: Range<usize>,
actual: usize,
},
UnsupportedVersion {
version: u32,
},
ValueEntriesOutOfBounds {
range: Range<usize>,
actual: usize,
},
}
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl std::error::Error for NtApiSetError {}