pub struct WiredTable<M> { /* private fields */ }Expand description
A declared Table with one request’s actions and policy wired on: what the list page
renders.
wired_table returns the panel’s for a resource. It reads as
its Table for loading a TablePage.
Implementations§
Source§impl<M> WiredTable<M>
impl<M> WiredTable<M>
Sourcepub async fn render<'a>(
&self,
cx: &'a Cx,
query: Query<List<M>>,
) -> Result<BoxView<'a>>
pub async fn render<'a>( &self, cx: &'a Cx, query: Query<List<M>>, ) -> Result<BoxView<'a>>
Load the page of query the table’s browser state selects, and render it.
Call it while a page body runs: the table declares its signals here, and the page reads
the list state from them, so a sort, search, filter or page change in the browser reruns
the page in place. Links keep their href, which spells the same state. A page rendering
several tables gives each its own prefix.
§Panics
Without a request context in cx.
§Errors
A misdeclared table (Table::declaration_errors)
fails with its errors rather than render, and a failed load fails with the database’s
error.
Methods from Deref<Target = Table<M>>§
Sourcepub fn declaration_errors(&self) -> Vec<DeclarationErrorKind>
pub fn declaration_errors(&self) -> Vec<DeclarationErrorKind>
What is wrong with this declaration.