Function std::local_data::pop
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
.