pub struct Context {
pub user_id: Option<String>,
pub roles: Option<Vec<String>>,
pub role: Option<String>,
pub internal: bool,
pub access_lists: HashMap<String, Value>,
pub access_list_errors: HashMap<String, String>,
}Fields§
§user_id: Option<String>§roles: Option<Vec<String>>§role: Option<String>§internal: bool§access_lists: HashMap<String, Value>ctx 中非身份键的数组清单(键 = ctx 键名,值 = 原样 JSON 数组)。
仅被 schema 的 accessKeys.read/write 引用时生效(见 crate::access)。
access_list_errors: HashMap<String, String>清单形态非法的 ctx 键(命中时报错,禁静默忽略)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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