pub trait AdminDataSource:
Debug
+ Send
+ Sync {
// Required methods
fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
query: &'life2 AdminListQuery,
) -> Pin<Box<dyn Future<Output = AppResult<AdminPage>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = AppResult<Option<Value>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
A module’s read access to its admin entities. Optional capability — only
modules with an admin surface implement it. Records cross as Value (the
only shape a generic renderer handles); strong types stay inside the impl.
Required Methods§
Sourcefn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
query: &'life2 AdminListQuery,
) -> Pin<Box<dyn Future<Output = AppResult<AdminPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
query: &'life2 AdminListQuery,
) -> Pin<Box<dyn Future<Output = AppResult<AdminPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List records for entity, paginated. Returns a page of JSON objects.
Sourcefn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = AppResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = AppResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetch one record by id. Ok(None) if not found.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".