pub struct AuthContext {
pub config: Arc<AuthConfig>,
pub database: Arc<dyn DatabaseAdapter>,
pub metadata: HashMap<String, Value>,
}Expand description
Context passed to plugin methods
Fields§
§config: Arc<AuthConfig>§database: Arc<dyn DatabaseAdapter>§metadata: HashMap<String, Value>Implementations§
Source§impl AuthContext
impl AuthContext
pub fn new(config: Arc<AuthConfig>, database: Arc<dyn DatabaseAdapter>) -> Self
pub fn set_metadata(&mut self, key: impl Into<String>, value: Value)
pub fn get_metadata(&self, key: &str) -> Option<&Value>
Auto Trait Implementations§
impl Freeze for AuthContext
impl !RefUnwindSafe for AuthContext
impl Send for AuthContext
impl Sync for AuthContext
impl Unpin for AuthContext
impl !UnwindSafe for AuthContext
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