pub trait TupleReader: Send + Sync {
// Required methods
fn read_tuples<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 TupleFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tuple>, AuthzError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn read_user_tuple<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
object_type: &'life1 str,
object_id: &'life2 str,
relation: &'life3 str,
subject_type: &'life4 str,
subject_id: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Tuple>, AuthzError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait;
fn read_userset_tuples<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
object_type: &'life1 str,
object_id: &'life2 str,
relation: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tuple>, AuthzError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn read_starting_with_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
subject_type: &'life1 str,
subject_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tuple>, AuthzError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn read_user_tuple_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
object_type: &'life1 str,
object_id: &'life2 str,
relations: &'life3 [String],
subject_type: &'life4 str,
subject_id: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Tuple>, AuthzError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait;
}Expand description
Reads tuples from the datastore.
Required Methods§
fn read_tuples<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 TupleFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tuple>, AuthzError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_user_tuple<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
object_type: &'life1 str,
object_id: &'life2 str,
relation: &'life3 str,
subject_type: &'life4 str,
subject_id: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Tuple>, AuthzError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn read_userset_tuples<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
object_type: &'life1 str,
object_id: &'life2 str,
relation: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tuple>, AuthzError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_starting_with_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
subject_type: &'life1 str,
subject_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tuple>, AuthzError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn read_user_tuple_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
object_type: &'life1 str,
object_id: &'life2 str,
relations: &'life3 [String],
subject_type: &'life4 str,
subject_id: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Tuple>, AuthzError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn read_user_tuple_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
object_type: &'life1 str,
object_id: &'life2 str,
relations: &'life3 [String],
subject_type: &'life4 str,
subject_id: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Tuple>, AuthzError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Batch read: check if any of the given relations match for a user. Returns the first matching tuple, or None if no match found.