pub struct CoilAuth<E> { /* private fields */ }Implementations§
Source§impl<E> CoilAuth<E>where
E: RebacEngine,
impl<E> CoilAuth<E>where
E: RebacEngine,
pub async fn apply_default_schema(&self) -> Result<(), RebacError>
pub async fn apply_model_package<P>(
&self,
package: &P,
) -> Result<(), RebacError>where
P: AuthModelPackage + ?Sized,
pub async fn write( &self, updates: impl IntoIterator<Item = DefaultTupleUpdate>, ) -> Result<(), RebacError>
pub async fn check( &self, subject: &DefaultSubject, relation: Relation, object: &Entity, ) -> Result<bool, RebacError>
pub async fn check_capability<P>(
&self,
package: &P,
subject: &DefaultSubject,
capability: Capability,
object: &Entity,
) -> Result<bool, CoilAuthError>where
P: AuthModelPackage + ?Sized,
pub async fn check_default_capability( &self, subject: &DefaultSubject, capability: Capability, object: &Entity, ) -> Result<bool, CoilAuthError>
pub async fn explain_capability<P>(
&self,
package: &P,
subject: &DefaultSubject,
capability: Capability,
object: &Entity,
) -> Result<CapabilityExplanation, CoilAuthError>where
P: AuthModelPackage + ?Sized,
pub async fn explain_capability_with_options<P>(
&self,
package: &P,
subject: &DefaultSubject,
capability: Capability,
object: &Entity,
options: ExplainOptions,
) -> Result<CapabilityExplanation, CoilAuthError>where
P: AuthModelPackage + ?Sized,
pub async fn explain_default_capability( &self, subject: &DefaultSubject, capability: Capability, object: &Entity, ) -> Result<CapabilityExplanation, CoilAuthError>
pub async fn explain_default_capability_with_options( &self, subject: &DefaultSubject, capability: Capability, object: &Entity, options: ExplainOptions, ) -> Result<CapabilityExplanation, CoilAuthError>
pub async fn check_many( &self, requests: impl IntoIterator<Item = AccessCheck>, ) -> Result<Vec<bool>, RebacError>
pub async fn list_objects( &self, subject: &DefaultSubject, relation: Relation, namespace: Namespace, ) -> Result<Vec<String>, RebacError>
pub async fn list_subject_ids( &self, object: &Entity, relation: Relation, namespace: Namespace, ) -> Result<Vec<String>, RebacError>
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for CoilAuth<E>where
E: Freeze,
impl<E> RefUnwindSafe for CoilAuth<E>where
E: RefUnwindSafe,
impl<E> Send for CoilAuth<E>where
E: Send,
impl<E> Sync for CoilAuth<E>where
E: Sync,
impl<E> Unpin for CoilAuth<E>where
E: Unpin,
impl<E> UnsafeUnpin for CoilAuth<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for CoilAuth<E>where
E: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more