#[repr(C)]pub struct Handle {
pub id: u32,
pub generation: u32,
}Expand description
A generic handle to a kernel object.
Handles are unforgeable kernel-managed tokens that identify resources. The generation counter prevents use-after-free attacks when handles are recycled after object destruction.
Fields§
§id: u32Unique identifier within the object pool.
generation: u32Generation counter for stale handle detection. Incremented each time the slot is reused.
Implementations§
Trait Implementations§
impl Copy for Handle
impl Eq for Handle
impl StructuralPartialEq for Handle
Auto Trait Implementations§
impl Freeze for Handle
impl RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnsafeUnpin for Handle
impl UnwindSafe for Handle
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