pub struct OwnershipTuples<'a, O: ?Sized> { /* private fields */ }Expand description
An OwnershipStore read as the schema’s TupleSource at instant
now, for the set-aware checks: schema.may_grant(&OwnershipTuples::at(&*store, now), …),
holds,
held_by,
members. Rows whose lease has
lapsed at now are dropped (R734-F4). A newtype because the orphan rule
forbids a blanket impl of cheers-core’s trait for every store.
Implementations§
Trait Implementations§
Source§impl<'a, O: OwnershipStore + ?Sized> TupleSource for OwnershipTuples<'a, O>
impl<'a, O: OwnershipStore + ?Sized> TupleSource for OwnershipTuples<'a, O>
type Tuple = OwnershipRow
Source§fn list_for_principal<'life0, 'life1, 'async_trait>(
&'life0 self,
p: &'life1 PrincipalId,
) -> Pin<Box<dyn Future<Output = Result<Vec<OwnershipRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_for_principal<'life0, 'life1, 'async_trait>(
&'life0 self,
p: &'life1 PrincipalId,
) -> Pin<Box<dyn Future<Output = Result<Vec<OwnershipRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Tuples whose subject is exactly
principal — no set rows.Source§fn list_for_resource<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
kind: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<OwnershipRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_for_resource<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
kind: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<OwnershipRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Tuples on resource
(kind, id), either subject form.Source§fn list_for_subject_set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
kind: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<OwnershipRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_for_subject_set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
kind: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<OwnershipRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Tuples whose subject is a set on
(kind, id), any subject relation.Auto Trait Implementations§
impl<'a, O> Freeze for OwnershipTuples<'a, O>
impl<'a, O> RefUnwindSafe for OwnershipTuples<'a, O>
impl<'a, O> Send for OwnershipTuples<'a, O>
impl<'a, O> Sync for OwnershipTuples<'a, O>
impl<'a, O> Unpin for OwnershipTuples<'a, O>
impl<'a, O> UnsafeUnpin for OwnershipTuples<'a, O>
impl<'a, O> UnwindSafe for OwnershipTuples<'a, O>
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