pub struct AccessConfig {
pub public: HashSet<PublicAccess>,
pub roles: HashMap<PublicAccess, OpPolicy>,
}Expand description
@access directive — authorization axis.
Bare @access (no args) inherits the app’s auth pipeline (current
default behavior). Set public to allow unauthenticated callers
to perform specific operations; set roles to require specific
roles per operation.
Fields§
§public: HashSet<PublicAccess>Operations anyone can perform without authentication. Same
semantics as the older @export(public:) allow-list.
roles: HashMap<PublicAccess, OpPolicy>Per-op required roles + optional per-protocol gating.
A request to operation Op arriving on
transport P is allowed when the authenticated user holds at
least one of roles[&Op].allowed_for(P). Missing-from-the-map
= no per-op role requirement; the app’s auth pipeline decides.
Trait Implementations§
Source§impl Clone for AccessConfig
impl Clone for AccessConfig
Source§fn clone(&self) -> AccessConfig
fn clone(&self) -> AccessConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AccessConfig
impl Debug for AccessConfig
Source§impl Default for AccessConfig
impl Default for AccessConfig
Source§fn default() -> AccessConfig
fn default() -> AccessConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AccessConfig
impl RefUnwindSafe for AccessConfig
impl Send for AccessConfig
impl Sync for AccessConfig
impl Unpin for AccessConfig
impl UnsafeUnpin for AccessConfig
impl UnwindSafe for AccessConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more