pub enum DescriptorError {
ZeroDescriptor,
OutOfRange {
descriptor: u64,
max_valid: u64,
},
AlreadyFreed(u64),
AlreadyInUse(u64),
AlreadyAllocated(u64),
InvalidCapacity(u64),
OwnershipMismatch {
expected: u32,
actual: u32,
},
GenerationMismatch {
expected: u64,
actual: u64,
},
InvalidFrameShift(u32),
TransactionFailed(String),
}Expand description
描述符校验错误
Variants§
ZeroDescriptor
描述符为零(无效)
OutOfRange
描述符超出范围
AlreadyFreed(u64)
描述符已释放
AlreadyInUse(u64)
描述符已在使用
AlreadyAllocated(u64)
帧已被引擎分配(位图已置位),重复分配会破坏守恒等式(fail-closed)
InvalidCapacity(u64)
帧容量超出 20-bit 帧索引域(> 2^20),构造期 fail-closed
OwnershipMismatch
所有权不匹配
GenerationMismatch
代际不匹配
InvalidFrameShift(u32)
帧移位(log2(frame_size))非法
合法区间 11..=15(帧大小 2048..=32768 字节)。超出区间的移位会使
frame_index << frame_shift 在 debug 触发 shift-overflow panic、
在 release 触发移位掩码静默产生错误地址,故必须构造期拒绝(fail-closed)。
TransactionFailed(String)
事务失败
Implementations§
Source§impl DescriptorError
impl DescriptorError
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
获取错误严重级别
Trait Implementations§
Source§impl Debug for DescriptorError
impl Debug for DescriptorError
Source§impl Display for DescriptorError
impl Display for DescriptorError
Source§impl Error for DescriptorError
impl Error for DescriptorError
1.30.0 · 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 From<DescriptorError> for LinuxError
impl From<DescriptorError> for LinuxError
Source§fn from(e: DescriptorError) -> Self
fn from(e: DescriptorError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DescriptorError
impl RefUnwindSafe for DescriptorError
impl Send for DescriptorError
impl Sync for DescriptorError
impl Unpin for DescriptorError
impl UnsafeUnpin for DescriptorError
impl UnwindSafe for DescriptorError
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