pub enum AccessScope {
None,
Tenant {
tenant: TenantId,
},
Paths {
tenant: TenantId,
roots: Vec<ScopePath>,
},
}Expand description
针对具体权限查询合并后的访问范围。
Variants§
Implementations§
Source§impl AccessScope
impl AccessScope
Sourcepub fn merge(
tenant: TenantId,
grants: impl IntoIterator<Item = GrantScope>,
) -> Self
pub fn merge( tenant: TenantId, grants: impl IntoIterator<Item = GrantScope>, ) -> Self
将授权范围合并为最终访问范围。
Sourcepub fn allows_path(&self, target: &ScopePath) -> bool
pub fn allows_path(&self, target: &ScopePath) -> bool
返回该范围是否允许访问目标路径。
Trait Implementations§
Source§impl Clone for AccessScope
impl Clone for AccessScope
Source§fn clone(&self) -> AccessScope
fn clone(&self) -> AccessScope
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 AccessScope
impl Debug for AccessScope
Source§impl PartialEq for AccessScope
impl PartialEq for AccessScope
Source§fn eq(&self, other: &AccessScope) -> bool
fn eq(&self, other: &AccessScope) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for AccessScope
impl StructuralPartialEq for AccessScope
Auto Trait Implementations§
impl Freeze for AccessScope
impl RefUnwindSafe for AccessScope
impl Send for AccessScope
impl Sync for AccessScope
impl Unpin for AccessScope
impl UnsafeUnpin for AccessScope
impl UnwindSafe for AccessScope
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