pub struct PermissionDef {
pub path: &'static str,
pub method: &'static str,
pub permission: &'static str,
}Expand description
路径权限定义 —— 由 #[permission("xxx")] 宏注解生成
每条记录描述一个接口路径所需的权限标识。
运行时通过 PermissionCheckLayer 中间件校验。
Fields§
§path: &'static strURL 路径
method: &'static strHTTP 方法
permission: &'static str所需权限标识
Trait Implementations§
Source§impl Clone for PermissionDef
impl Clone for PermissionDef
Source§fn clone(&self) -> PermissionDef
fn clone(&self) -> PermissionDef
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 moreAuto Trait Implementations§
impl Freeze for PermissionDef
impl RefUnwindSafe for PermissionDef
impl Send for PermissionDef
impl Sync for PermissionDef
impl Unpin for PermissionDef
impl UnsafeUnpin for PermissionDef
impl UnwindSafe for PermissionDef
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