pub struct ApplicationBuilder { /* private fields */ }Expand description
Collects what goes in an Application.
Implementations§
Source§impl ApplicationBuilder
impl ApplicationBuilder
Sourcepub fn entity(self, entity: EntityInfo) -> Self
pub fn entity(self, entity: EntityInfo) -> Self
Adds an entity outside any module.
Sourcepub fn entity_of<T: BusinessObject>(self) -> Self
pub fn entity_of<T: BusinessObject>(self) -> Self
Adds an entity declared as a Rust struct.
Sourcepub fn dashboard(self, dashboard: DashboardInfo) -> Self
pub fn dashboard(self, dashboard: DashboardInfo) -> Self
Adds a dashboard.
Sourcepub fn service<T: 'static>(self, service: T) -> Self
pub fn service<T: 'static>(self, service: T) -> Self
Gives actions and controllers something the application has, which they ask for by its
type with ActionContext::service.
Sourcepub fn translation(
self,
language: impl Into<String>,
difference: impl Into<String>,
) -> Self
pub fn translation( self, language: impl Into<String>, difference: impl Into<String>, ) -> Self
The model in another language, as a difference in JSON.
Application::set_language picks it.
Sourcepub fn build(self) -> Result<Application, ModelError>
pub fn build(self) -> Result<Application, ModelError>
Puts it together: orders the modules, generates the model, lets the modules change it, applies their layers and checks the result. What is wrong comes out here, and not when someone reaches that screen.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ApplicationBuilder
impl !Send for ApplicationBuilder
impl !Sync for ApplicationBuilder
impl !UnwindSafe for ApplicationBuilder
impl Freeze for ApplicationBuilder
impl Unpin for ApplicationBuilder
impl UnsafeUnpin for ApplicationBuilder
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