Skip to main content

use_context

Function use_context 

Source
pub fn use_context<'s, T: 'static>(cx: &Cx<'s, '_>) -> Option<Handle<'s, T>>
Expand description

Read the innermost Handle provided for T, if any.

A Handle rather than a guard: the provider usually still holds its own state, and two guards on one slot would double-borrow.