Skip to main content

with_identity

Function with_identity 

Source
pub fn with_identity<R>(identity: Identity, f: impl FnOnce() -> R) -> R
Expand description

Run f as identity (what Identity::current returns inside it); the previous one comes back afterwards, also on panic. Authenticators call this around the rest of the request.