Crate ambient_authority[−][src]
Ambient Authority
Capability-oriented library APIs should re-export the ambient_authority
function and AmbientAuthority
type in their own API, and include this
type as an argument to any function which utilizes ambient authority.
For example:
// Re-export the `AmbientAuthority` type. pub use ambient_authority::{ambient_authority, AmbientAuthority}; // Declare functions that use ambient authority with an `AmbientAuthority` // argument. pub fn do_a_thing(_: AmbientAuthority) { println!("hello world"); }
To use an API that uses AmbientAuthority
, call ambient_authority
and pass the result:
ⓘ
use ambient_authority::ambient_authority; do_a_thing(ambient_authority());
Structs
AmbientAuthority | Instances of this |
Functions
ambient_authority | Return an |