Struct Handle
pub struct Handle(/* private fields */);Expand description
A batching-callback slot handle: a binding-private slot index (into the
hook’s pending-value table) packed with an optional splice-flag high bit. A
repr(transparent) u32 newtype so the packed word — like Action — is
reachable only through its accessors, never as a bare integer.
Implementations§
§impl Handle
impl Handle
pub const MAX_SLOT: u32
pub const MAX_SLOT: u32
Largest slot index that fits below the splice-flag bit; the batching binding must keep its slot table within this ceiling.
pub fn new(index: u32) -> Handle
pub fn new(index: u32) -> Handle
A handle over slot index, no splice flag (index <= MAX_SLOT,
debug-asserted — the flag owns the high bit).
pub fn has_splice_flag(self) -> bool
pub fn has_splice_flag(self) -> bool
Whether drain_hook_return marked this as a _-splice child (inline the
slot value’s .children into the parent, not the value itself).
pub fn with_splice_flag(self) -> Handle
pub fn with_splice_flag(self) -> Handle
The same handle with the splice flag set.
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