pub struct FastContext(/* private fields */);Expand description
快速路径上下文。
将陷入处理器上下文中在快速路径中可安全操作的部分暴露给快速路径函数。
Implementations§
Source§impl FastContext
impl FastContext
Sourcepub fn regs(&mut self) -> &mut FlowContext
pub fn regs(&mut self) -> &mut FlowContext
获取控制流上下文。
Sourcepub fn swap_context(
&mut self,
new: NonNull<FlowContext>,
) -> NonNull<FlowContext>
pub fn swap_context( &mut self, new: NonNull<FlowContext>, ) -> NonNull<FlowContext>
交换上下文指针。
Sourcepub fn call(self, argc: usize) -> FastResult
pub fn call(self, argc: usize) -> FastResult
启动一个带有 argc 个参数的新上下文。
Sourcepub fn restore(self) -> FastResult
pub fn restore(self) -> FastResult
从快速路径恢复。
NOTICE 必须先手工调用
save_args,或通过其他方式设置参数寄存器。
Sourcepub fn switch_to(self, others: NonNull<FlowContext>) -> FastResult
pub fn switch_to(self, others: NonNull<FlowContext>) -> FastResult
丢弃当前上下文,并直接切换到另一个上下文。
Sourcepub fn continue_with<T: 'static>(self, f: EntireHandler<T>, t: T) -> FastResult
pub fn continue_with<T: 'static>(self, f: EntireHandler<T>, t: T) -> FastResult
向完整路径 f 传递对象 t。
NOTICE 必须先手工调用
save_args,或通过其他方式设置参数寄存器。
Auto Trait Implementations§
impl Freeze for FastContext
impl RefUnwindSafe for FastContext
impl !Send for FastContext
impl !Sync for FastContext
impl Unpin for FastContext
impl !UnwindSafe for FastContext
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