pub fn pop<T: 'static>(key: Key<T>) -> Option<T>
Removes a task-local value from task-local storage. This will return Some(value) if the key was present in TLS, otherwise it will return None.
A runtime assertion will be triggered it removal of TLS value is attempted
while the value is still loaned out via get
or get_mut
.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).