pub struct AppState {
pub config: Arc<Config>,
pub repository: Arc<SqliteRepository>,
pub db_pool: SqlitePool,
}Expand description
Holds data accessible from each handler.
Fields§
§config: Arc<Config>Application configuration.
repository: Arc<SqliteRepository>Repository for data access.
db_pool: SqlitePoolSQLx connection pool for the SQLite database.
Trait Implementations§
Source§impl IntoApiMethodRouter<AppState> for create_subscription
impl IntoApiMethodRouter<AppState> for create_subscription
Source§fn into_get_route(self) -> ApiMethodRouter<AppState>
fn into_get_route(self) -> ApiMethodRouter<AppState>
Convert into a GET route with documentation
Source§fn into_post_route(self) -> ApiMethodRouter<AppState>
fn into_post_route(self) -> ApiMethodRouter<AppState>
Convert into a POST route with documentation
Source§fn into_patch_route(self) -> ApiMethodRouter<AppState>
fn into_patch_route(self) -> ApiMethodRouter<AppState>
Convert into a PATCH route with documentation
Source§fn into_delete_route(self) -> ApiMethodRouter<AppState>
fn into_delete_route(self) -> ApiMethodRouter<AppState>
Convert into a DELETE route with documentation
Source§fn into_put_route(self) -> ApiMethodRouter<AppState>
fn into_put_route(self) -> ApiMethodRouter<AppState>
Convert into a PUT route with documentation
Source§impl IntoApiMethodRouter<AppState> for list_subscriptions
impl IntoApiMethodRouter<AppState> for list_subscriptions
Source§fn into_get_route(self) -> ApiMethodRouter<AppState>
fn into_get_route(self) -> ApiMethodRouter<AppState>
Convert into a GET route with documentation
Source§fn into_post_route(self) -> ApiMethodRouter<AppState>
fn into_post_route(self) -> ApiMethodRouter<AppState>
Convert into a POST route with documentation
Source§fn into_patch_route(self) -> ApiMethodRouter<AppState>
fn into_patch_route(self) -> ApiMethodRouter<AppState>
Convert into a PATCH route with documentation
Source§fn into_delete_route(self) -> ApiMethodRouter<AppState>
fn into_delete_route(self) -> ApiMethodRouter<AppState>
Convert into a DELETE route with documentation
Source§fn into_put_route(self) -> ApiMethodRouter<AppState>
fn into_put_route(self) -> ApiMethodRouter<AppState>
Convert into a PUT route with documentation
Source§impl IntoApiMethodRouter<AppState> for get_subscription
impl IntoApiMethodRouter<AppState> for get_subscription
Source§fn into_get_route(self) -> ApiMethodRouter<AppState>
fn into_get_route(self) -> ApiMethodRouter<AppState>
Convert into a GET route with documentation
Source§fn into_post_route(self) -> ApiMethodRouter<AppState>
fn into_post_route(self) -> ApiMethodRouter<AppState>
Convert into a POST route with documentation
Source§fn into_patch_route(self) -> ApiMethodRouter<AppState>
fn into_patch_route(self) -> ApiMethodRouter<AppState>
Convert into a PATCH route with documentation
Source§fn into_delete_route(self) -> ApiMethodRouter<AppState>
fn into_delete_route(self) -> ApiMethodRouter<AppState>
Convert into a DELETE route with documentation
Source§fn into_put_route(self) -> ApiMethodRouter<AppState>
fn into_put_route(self) -> ApiMethodRouter<AppState>
Convert into a PUT route with documentation
Source§impl IntoApiMethodRouter<AppState> for update_subscription
impl IntoApiMethodRouter<AppState> for update_subscription
Source§fn into_get_route(self) -> ApiMethodRouter<AppState>
fn into_get_route(self) -> ApiMethodRouter<AppState>
Convert into a GET route with documentation
Source§fn into_post_route(self) -> ApiMethodRouter<AppState>
fn into_post_route(self) -> ApiMethodRouter<AppState>
Convert into a POST route with documentation
Source§fn into_patch_route(self) -> ApiMethodRouter<AppState>
fn into_patch_route(self) -> ApiMethodRouter<AppState>
Convert into a PATCH route with documentation
Source§fn into_delete_route(self) -> ApiMethodRouter<AppState>
fn into_delete_route(self) -> ApiMethodRouter<AppState>
Convert into a DELETE route with documentation
Source§fn into_put_route(self) -> ApiMethodRouter<AppState>
fn into_put_route(self) -> ApiMethodRouter<AppState>
Convert into a PUT route with documentation
Source§impl IntoApiMethodRouter<AppState> for delete_subscription
impl IntoApiMethodRouter<AppState> for delete_subscription
Source§fn into_get_route(self) -> ApiMethodRouter<AppState>
fn into_get_route(self) -> ApiMethodRouter<AppState>
Convert into a GET route with documentation
Source§fn into_post_route(self) -> ApiMethodRouter<AppState>
fn into_post_route(self) -> ApiMethodRouter<AppState>
Convert into a POST route with documentation
Source§fn into_patch_route(self) -> ApiMethodRouter<AppState>
fn into_patch_route(self) -> ApiMethodRouter<AppState>
Convert into a PATCH route with documentation
Source§fn into_delete_route(self) -> ApiMethodRouter<AppState>
fn into_delete_route(self) -> ApiMethodRouter<AppState>
Convert into a DELETE route with documentation
Source§fn into_put_route(self) -> ApiMethodRouter<AppState>
fn into_put_route(self) -> ApiMethodRouter<AppState>
Convert into a PUT route with documentation
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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