pub trait DataSource: Send + Sync {
// Required methods
fn action(&self) -> ActionMeta;
fn fetch(&self, ctx: Ctx, input: Json) -> BoxFuture<Result<Json>>;
}Expand description
Data a component fetches from the server through an action, such as lookup options or tree children. The server finds it by node path and key, checks the screen’s access, the feature’s guards and the action’s permission, then runs it.
Required Methods§
fn action(&self) -> ActionMeta
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<E: Model> DataSource for SearchBox<E>
impl<M: Model, A> DataSource for SubmitForm<M, A>
Checks one step of a stepped form: reads every submitted value the way a save would and returns the errors of the step’s fields only. Nothing is saved; the submit action’s permission is required, as for saving.