pub enum OpPolicy {
AnyProtocol(Vec<String>),
PerProtocol(HashMap<Protocol, Vec<String>>),
}Expand description
Per-op policy in @access(roles:).
AnyProtocol(roles) — the historical flat list shape; the role
list applies regardless of which transport delivered the request.
Parsed from roles: { update: [admin, editor] }.
PerProtocol(map) — gates by (role, protocol); only the
roles listed for the originating transport are allowed. Parsed
from roles: { update: { rest: [admin], mqtt: [client] } }.
Variants§
AnyProtocol(Vec<String>)
Flat list: the role list applies regardless of transport.
Parsed from roles: { update: [admin, editor] }.
PerProtocol(HashMap<Protocol, Vec<String>>)
Per-protocol matrix: only roles listed for the originating
transport are allowed. Parsed from
roles: { update: { rest: [admin], mqtt: [client] } }.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpPolicy
impl RefUnwindSafe for OpPolicy
impl Send for OpPolicy
impl Sync for OpPolicy
impl Unpin for OpPolicy
impl UnsafeUnpin for OpPolicy
impl UnwindSafe for OpPolicy
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