Skip to main content

get_handle

Function get_handle 

Source
pub fn get_handle() -> Result<ScopeHandle>
Expand description

Return the current scope at the top of the active stack.

This reads the task-local or thread-local scope stack without mutating it and returns a clone of the current top-most ScopeHandle.

§Returns

A Result containing the current ScopeHandle when the runtime owner check succeeds.

§Errors

Returns an error when the current binding has not initialized the shared runtime ownership correctly.