pub struct CasbinService { /* private fields */ }
Implementations§
Source§impl CasbinService
impl CasbinService
pub async fn new<M: TryIntoModel, A: TryIntoAdapter>( m: M, a: A, ) -> CasbinResult<Self>
pub fn get_enforcer(&mut self) -> Arc<RwLock<CachedEnforcer>>
pub fn set_enforcer(e: Arc<RwLock<CachedEnforcer>>) -> CasbinService
Trait Implementations§
Source§impl Clone for CasbinService
impl Clone for CasbinService
Source§fn clone(&self) -> CasbinService
fn clone(&self) -> CasbinService
Returns a copy 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 Deref for CasbinService
impl Deref for CasbinService
Source§impl DerefMut for CasbinService
impl DerefMut for CasbinService
Source§impl<S, B> Transform<S, ServiceRequest> for CasbinServicewhere
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
B: MessageBody,
impl<S, B> Transform<S, ServiceRequest> for CasbinServicewhere
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
B: MessageBody,
Source§type Response = ServiceResponse<EitherBody<B>>
type Response = ServiceResponse<EitherBody<B>>
Responses produced by the service.
Source§type Transform = CasbinMiddleware<S>
type Transform = CasbinMiddleware<S>
The
TransformService
value created by this factorySource§type Future = Ready<Result<<CasbinService as Transform<S, ServiceRequest>>::Transform, <CasbinService as Transform<S, ServiceRequest>>::InitError>>
type Future = Ready<Result<<CasbinService as Transform<S, ServiceRequest>>::Transform, <CasbinService as Transform<S, ServiceRequest>>::InitError>>
The future response value.
Source§fn new_transform(&self, service: S) -> Self::Future
fn new_transform(&self, service: S) -> Self::Future
Creates and returns a new Transform component, asynchronously
Auto Trait Implementations§
impl Freeze for CasbinService
impl !RefUnwindSafe for CasbinService
impl Send for CasbinService
impl Sync for CasbinService
impl Unpin for CasbinService
impl !UnwindSafe for CasbinService
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