pub struct Application<M = NoMigrator>where
M: MigratorTrait,{ /* private fields */ }Expand description
Application builder for Ferro framework
Use this to configure and run your Ferro application with a fluent API.
Implementations§
Source§impl Application<NoMigrator>
impl Application<NoMigrator>
Source§impl<M> Application<M>where
M: MigratorTrait,
impl<M> Application<M>where
M: MigratorTrait,
Sourcepub fn migrations<NewM>(self) -> Application<NewM>where
NewM: MigratorTrait,
pub fn migrations<NewM>(self) -> Application<NewM>where
NewM: MigratorTrait,
Sourcepub async fn run(self)
pub async fn run(self)
Run the application
This parses CLI arguments and executes the appropriate command:
serve(default): Run the web serverdb:migrate: Run pending migrationsdb:status: Show migration statusdb:rollback: Rollback migrationsdb:fresh: Drop and re-run all migrationsschedule:*: Scheduler commands
Trait Implementations§
Source§impl Default for Application<NoMigrator>
impl Default for Application<NoMigrator>
Auto Trait Implementations§
impl<M> Freeze for Application<M>
impl<M = NoMigrator> !RefUnwindSafe for Application<M>
impl<M = NoMigrator> !Send for Application<M>
impl<M = NoMigrator> !Sync for Application<M>
impl<M> Unpin for Application<M>where
M: Unpin,
impl<M> UnsafeUnpin for Application<M>
impl<M = NoMigrator> !UnwindSafe for Application<M>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more