pub struct StaticAccessControl { /* private fields */ }Expand description
Static AccessControlPort backed by a list of ChannelAccessPolicy.
Empty allow_from on a policy means “allow all” (default open).
Unknown channels fall back to the default policy (allow all).
Implementations§
Source§impl StaticAccessControl
impl StaticAccessControl
Sourcepub fn new(policies: Vec<ChannelAccessPolicy>) -> Self
pub fn new(policies: Vec<ChannelAccessPolicy>) -> Self
Create a new instance from a list of channel policies.
Trait Implementations§
Source§impl AccessControlPort for StaticAccessControl
impl AccessControlPort for StaticAccessControl
Source§fn check_access(&self, channel: &str, sender_id: &str) -> AccessDecision
fn check_access(&self, channel: &str, sender_id: &str) -> AccessDecision
Check whether a sender is allowed on a channel.
Source§fn policies(&self) -> &[ChannelAccessPolicy]
fn policies(&self) -> &[ChannelAccessPolicy]
List all configured policies.
Source§impl Clone for StaticAccessControl
impl Clone for StaticAccessControl
Source§fn clone(&self) -> StaticAccessControl
fn clone(&self) -> StaticAccessControl
Returns a duplicate of the value. Read more
1.0.0 · 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 StaticAccessControl
impl Debug for StaticAccessControl
Source§impl Default for StaticAccessControl
impl Default for StaticAccessControl
Source§fn default() -> StaticAccessControl
fn default() -> StaticAccessControl
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StaticAccessControl
impl RefUnwindSafe for StaticAccessControl
impl Send for StaticAccessControl
impl Sync for StaticAccessControl
impl Unpin for StaticAccessControl
impl UnsafeUnpin for StaticAccessControl
impl UnwindSafe for StaticAccessControl
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