#![allow(deprecated)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(feature = "pages")]
#[doc(hidden)]
pub mod reinhardt_pages {
pub use reinhardt_pages::*;
}
#[doc(hidden)]
pub mod reinhardt_types {
#[allow(unused_imports, unreachable_pub)]
pub use reinhardt_core::types::*;
}
#[cfg(all(feature = "core", native))]
#[doc(hidden)]
pub mod reinhardt_apps {
pub use reinhardt_apps::*;
}
#[cfg(not(native))]
#[doc(hidden)]
pub mod reinhardt_apps {
pub mod apps {
pub trait AppLabel {
const LABEL: &'static str;
fn path(&self) -> &'static str {
Self::LABEL
}
}
}
pub struct AppConfig {
_private: (),
}
impl AppConfig {
pub fn new(_name: impl Into<String>, _label: impl Into<String>) -> Self {
Self { _private: () }
}
pub fn with_verbose_name(self, _verbose_name: impl Into<String>) -> Self {
self
}
}
}
#[cfg(all(feature = "di", native))]
#[doc(hidden)]
pub mod reinhardt_di {
pub use reinhardt_di::*;
}
#[cfg(all(feature = "auth", native))]
#[doc(hidden)]
pub mod reinhardt_auth {
pub use reinhardt_auth::*;
}
#[cfg(all(feature = "commands", native))]
#[doc(hidden)]
pub mod reinhardt_commands {
pub use reinhardt_commands::*;
}
#[cfg(native)]
#[doc(hidden)]
pub mod reinhardt_core {
pub use reinhardt_core::*;
pub use reinhardt_core::endpoint::EndpointMetadata;
}
#[cfg(native)]
#[doc(hidden)]
pub mod reinhardt_http {
pub use reinhardt_http::*;
}
#[cfg(all(feature = "di", native))]
#[doc(hidden)]
pub mod reinhardt_params {
pub use reinhardt_di::params::*;
}
#[cfg(native)]
#[doc(hidden)]
pub mod async_trait {
pub use async_trait::*;
}
#[cfg(all(feature = "database", native))]
#[doc(hidden)]
pub mod linkme {
pub use linkme::*;
}
#[cfg(all(feature = "database", native))]
#[doc(hidden)]
pub mod ctor {
pub use ctor::*;
}
#[cfg(native)]
#[doc(hidden)]
pub use paste::paste;
#[cfg(all(feature = "database", native))]
#[doc(hidden)]
pub mod reinhardt_orm {
pub use reinhardt_db::orm::*;
}
#[cfg(feature = "pages")]
pub mod pages;
#[cfg(all(feature = "admin", native))]
pub mod admin;
#[cfg(all(feature = "core", native))]
pub mod apps;
#[cfg(all(feature = "commands", native))]
pub mod commands;
#[cfg(all(feature = "conf", native))]
pub mod conf;
#[cfg(all(feature = "core", native))]
pub mod core;
#[cfg(all(feature = "deeplink", native))]
pub mod deeplink;
#[cfg(all(feature = "dentdelion", native))]
pub mod dentdelion;
#[cfg(all(feature = "di", native))]
pub mod di;
#[cfg(all(feature = "dispatch", native))]
pub mod dispatch;
#[cfg(all(feature = "forms", native))]
pub mod forms;
#[cfg(all(feature = "graphql", native))]
pub mod graphql;
#[cfg(all(feature = "grpc", native))]
pub mod grpc;
#[cfg(native)]
pub mod http;
#[cfg(all(feature = "i18n", native))]
pub mod i18n;
#[cfg(all(feature = "mail", native))]
pub mod mail;
#[cfg(all(any(feature = "standard", feature = "middleware"), native))]
pub mod middleware;
#[cfg(all(feature = "rest", native))]
pub mod rest;
#[cfg(all(feature = "server", native))]
pub mod server;
#[cfg(all(feature = "shortcuts", native))]
pub mod shortcuts;
#[cfg(feature = "streaming")]
pub mod streaming;
#[cfg(all(feature = "tasks", native))]
pub mod tasks;
#[cfg(all(feature = "templates", native))]
pub mod template;
#[cfg(all(feature = "test", native))]
pub mod test;
#[cfg(native)]
pub mod urls;
#[cfg(not(native))]
pub mod urls {
pub mod prelude {
#[cfg(feature = "client-router")]
pub use reinhardt_urls::routers::unified_router::ServerRouterStub;
#[cfg(feature = "client-router")]
pub use reinhardt_urls::routers::{ClientRouter, UnifiedRouter};
#[cfg(not(feature = "client-router"))]
pub use stub::*;
#[cfg(not(feature = "client-router"))]
mod stub {
pub struct ServerRouterStub;
pub struct ClientRouter;
pub struct UnifiedRouter {
_private: (),
}
impl UnifiedRouter {
pub fn new() -> Self {
Self { _private: () }
}
pub fn with_namespace(self, _namespace: impl Into<String>) -> Self {
self
}
pub fn server<F>(self, _f: F) -> Self
where
F: FnOnce(ServerRouterStub) -> ServerRouterStub,
{
self
}
pub fn client<F>(self, _f: F) -> Self
where
F: FnOnce(ClientRouter) -> ClientRouter,
{
self
}
}
impl Default for UnifiedRouter {
fn default() -> Self {
Self::new()
}
}
}
}
pub mod proxy {}
}
#[cfg(native)]
pub mod utils;
#[cfg(native)]
pub mod views;
#[cfg(all(feature = "core", native))]
pub use reinhardt_apps::{AppConfig, AppError, AppResult, Apps};
pub use reinhardt_macros::{AppConfig, app_config, installed_apps};
#[cfg(all(feature = "conf", native))]
pub use reinhardt_macros::settings;
#[cfg(all(feature = "database", native))]
pub use reinhardt_macros::{Model, model};
#[cfg(all(feature = "database", native))]
pub use reinhardt_macros::collect_migrations;
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::migrations;
#[cfg(all(feature = "database", native))]
#[doc(hidden)]
pub use migrations as reinhardt_migrations;
#[doc(hidden)]
pub mod macros {
pub use reinhardt_macros::*;
}
#[cfg(native)]
pub use reinhardt_macros::{api_view, delete, get, patch, post, put};
#[cfg(native)]
pub use reinhardt_macros::flatten_imports;
#[cfg(native)]
#[deprecated(
since = "0.1.0-rc.16",
note = "use `flatten_imports!` instead. `define_views!` will be removed in a future version."
)]
#[macro_export]
macro_rules! define_views {
($($tt:tt)*) => {
$crate::flatten_imports!($($tt)*)
};
}
pub use reinhardt_macros::routes;
pub use reinhardt_macros::url_patterns;
#[cfg(native)]
pub use reinhardt_macros::viewset;
#[cfg(all(feature = "admin", native))]
pub use reinhardt_macros::admin;
#[cfg(all(feature = "conf", native))]
#[allow(deprecated)]
pub use reinhardt_conf::settings::{
AdvancedSettings, CacheSettings, CorsSettings, DatabaseConfig, EmailSettings, LoggingSettings,
MediaSettings, MiddlewareConfig, SessionSettings, Settings, SettingsError, StaticSettings,
TemplateConfig,
};
#[cfg(all(feature = "conf", native))]
pub use reinhardt_conf::SecuritySettings;
#[cfg(all(feature = "conf", native))]
pub use reinhardt_conf::settings::core_settings::{CoreSettings, HasCoreSettings};
#[cfg(all(feature = "conf", native))]
pub use reinhardt_conf::settings::fragment::SettingsFragment;
#[cfg(all(feature = "conf", native))]
pub use reinhardt_conf::settings::fragment::HasSettings;
#[cfg(all(feature = "conf", native))]
pub use reinhardt_conf::settings::builder::SettingsBuilder;
#[cfg(all(feature = "conf", native))]
pub use reinhardt_conf::settings::profile::Profile;
#[cfg(all(feature = "conf", native))]
pub use reinhardt_conf::settings::sources::{
DefaultSource, EnvSource, LowPriorityEnvSource, TomlFileSource,
};
pub use reinhardt_core::apply_update::ApplyUpdate;
#[cfg(native)]
pub use reinhardt_macros::{ApplyUpdate as DeriveApplyUpdate, apply_update};
#[cfg(all(feature = "core", native))]
pub use reinhardt_core::{
endpoint::EndpointMetadata,
exception::{Error, Result},
};
#[cfg(all(feature = "core", native))]
pub use reinhardt_http::{Handler, Middleware, MiddlewareChain, Request, Response, ViewResult};
#[cfg(all(feature = "core", native))]
#[doc(hidden)]
pub use inventory;
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::orm::{
DatabaseBackend, DatabaseConnection, Model, QuerySet, SoftDeletable, SoftDelete, Timestamped,
Timestamps,
};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::orm::{
Exists,
F,
FieldRef,
Filter,
FilterOperator,
FilterValue,
OuterRef,
Q,
QOperator,
Subquery,
};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::orm::{
Aggregate,
AggregateFunc,
AggregateValue,
Annotation,
AnnotationValue,
};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::orm::{
IsolationLevel,
QueryValue,
Savepoint,
Transaction,
TransactionExecutor,
TransactionScope,
atomic,
atomic_with_isolation,
};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::orm::{
Abs,
Cast,
Ceil,
Concat,
CurrentDate,
CurrentTime,
Extract,
ExtractComponent,
Floor,
Greatest,
Least,
Length,
Lower,
Mod,
Now,
NullIf,
Power,
Round,
SqlType,
Sqrt,
Substr,
Trim,
TrimType,
Upper,
};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::orm::{
DenseRank,
FirstValue,
Frame,
FrameBoundary,
FrameType,
Lag,
LastValue,
Lead,
NTile,
NthValue,
Rank,
RowNumber,
Window,
WindowFunction,
};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::orm::{
BTreeIndex,
CheckConstraint,
Constraint,
ForeignKeyConstraint,
GinIndex,
GistIndex,
HashIndex,
Index,
OnDelete,
OnUpdate,
UniqueConstraint,
};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::orm::{IntoValue, Order, QueryBuilderValue};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::pool::{ConnectionPool, PoolConfig, PoolError};
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::serializers::{Deserializer, JsonSerializer, Serializer};
#[cfg(native)]
pub use reinhardt_views::viewsets::{
Action, ActionType, CreateMixin, DestroyMixin, GenericViewSet, ListMixin, ModelViewSet,
ReadOnlyModelViewSet, RetrieveMixin, UpdateMixin, ViewSet,
};
#[cfg(native)]
pub use reinhardt_urls::routers::{
DefaultRouter, PathMatcher, PathPattern, Route, Router, RouterFactory, ServerRouter,
UrlPatternsRegistration, clear_router, get_router, is_router_registered, register_router,
register_router_arc,
};
#[cfg(feature = "client-router")]
pub use reinhardt_urls::routers::{
ClientPathPattern, ClientRoute, ClientRouteMatch, ClientRouter, ClientUrlReverser, FromPath,
HistoryState, NavigationType, ParamContext, SingleFromPath, UnifiedRouter,
clear_client_reverser, get_client_reverser, register_client_reverser,
};
#[cfg(feature = "client-router")]
pub use reinhardt_urls::routers::Path as ClientPath;
pub use reinhardt_urls::routers::ClientUrlResolver;
#[cfg(native)]
pub use reinhardt_urls::routers::resolver::UrlResolver;
#[cfg(native)]
pub use reinhardt_urls::routers::resolver::WebSocketUrlResolver;
#[cfg(all(feature = "auth", native))]
#[allow(deprecated)] pub use reinhardt_auth::{
AllowAny, AnonymousUser, AuthBackend, AuthInfo, AuthUser, BaseUser, CurrentUser, FullUser,
IsAdminUser, IsAuthenticated, PasswordHasher, Permission, PermissionsMixin, SimpleUser,
validate_auth_extractors,
};
#[cfg(all(feature = "auth", feature = "argon2-hasher", native))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "auth", feature = "argon2-hasher"))))]
pub use reinhardt_auth::{Argon2Hasher, DefaultUser, DefaultUserManager};
#[cfg(all(feature = "auth-jwt", native))]
pub use reinhardt_auth::{Claims, JwtAuth, JwtError};
#[cfg(all(feature = "auth", native))]
pub use reinhardt_auth::{
CreateGroupData,
CreateUserData,
Group,
GroupManagementError,
GroupManagementResult,
GroupManager,
ObjectPermission,
ObjectPermissionChecker,
ObjectPermissionManager,
UpdateUserData,
UserManagementError,
UserManagementResult,
UserManager,
};
#[cfg(all(feature = "sessions", feature = "middleware", native))]
pub use reinhardt_middleware::AuthenticationMiddleware;
#[cfg(all(feature = "middleware-auth-jwt", native))]
pub use reinhardt_middleware::JwtAuthMiddleware;
#[cfg(all(feature = "sessions", feature = "middleware", native))]
pub use reinhardt_middleware::{CookieSessionAuthMiddleware, CookieSessionConfig};
#[cfg(all(feature = "session-redis", feature = "middleware", native))]
pub use reinhardt_middleware::RedisSessionBackend;
#[cfg(all(any(feature = "standard", feature = "middleware"), native))]
pub use reinhardt_middleware::OriginGuardMiddleware;
#[cfg(all(feature = "sessions", feature = "middleware", native))]
pub use reinhardt_middleware::{PersistentRemoteUserMiddleware, RemoteUserMiddleware};
#[cfg(all(any(feature = "standard", feature = "middleware"), native))]
pub use reinhardt_middleware::{LoginRequiredConfig, LoginRequiredMiddleware};
#[cfg(all(any(feature = "standard", feature = "middleware"), native))]
pub use reinhardt_middleware::LoggingMiddleware;
#[cfg(all(feature = "middleware-cors", native))]
pub use reinhardt_middleware::CorsMiddleware;
#[cfg(all(feature = "middleware-security", native))]
pub use reinhardt_middleware::SecurityMiddleware;
#[cfg(all(feature = "middleware-security", native))]
#[allow(deprecated)] pub use reinhardt_middleware::SecurityConfig;
#[cfg(all(any(feature = "standard", feature = "middleware"), native))]
pub use reinhardt_middleware::{CspConfig, CspMiddleware, CspNonce};
#[cfg(all(any(feature = "standard", feature = "middleware"), native))]
pub use reinhardt_middleware::{XFrameOptions, XFrameOptionsMiddleware};
#[cfg(all(feature = "core", native))]
pub use reinhardt_http::Extensions;
#[cfg(native)]
pub use hyper::{Method, StatusCode};
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::pagination::{
CursorPagination, LimitOffsetPagination, PageNumberPagination, PaginatedResponse, Paginator,
};
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::filters::{
FieldOrderingExt, FilterBackend, FilterError, FilterResult, MultiTermSearch,
};
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::throttling::{
AnonRateThrottle, ScopedRateThrottle, Throttle, UserRateThrottle,
};
#[cfg(all(feature = "core", native))]
pub use reinhardt_core::signals::{
M2MAction, M2MChangeEvent, Signal, m2m_changed, post_delete, post_save, pre_delete, pre_save,
};
#[cfg(all(feature = "core", native))]
pub use reinhardt_core::validators::{
CreditCardValidator, EmailValidator, IBANValidator, IPAddressValidator, PhoneNumberValidator,
UrlValidator, Validate, ValidationError as ValidatorError, ValidationErrors, ValidationResult,
Validator,
};
#[cfg(native)]
pub use reinhardt_views::{
Context, DetailView, ListView, MultipleObjectMixin, SingleObjectMixin, View,
};
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::parsers::{
FileUploadParser, FormParser, JSONParser, MediaType, MultiPartParser, ParseError, ParseResult,
Parser,
};
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::versioning::{
AcceptHeaderVersioning, BaseVersioning, HostNameVersioning, NamespaceVersioning,
QueryParameterVersioning, RequestVersionExt, URLPathVersioning, VersioningError,
VersioningMiddleware,
};
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::metadata::{
ActionMetadata, BaseMetadata, ChoiceInfo, FieldInfo, FieldInfoBuilder, FieldType,
MetadataOptions, MetadataResponse, SimpleMetadata,
};
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::negotiation::*;
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::{
filters, metadata, negotiation, pagination, parsers, serializers, throttling, versioning,
};
#[cfg(all(feature = "rest", native))]
pub use reinhardt_rest::browsable_api;
#[cfg(all(feature = "openapi", native))]
pub use reinhardt_rest::openapi::*;
#[cfg(all(feature = "openapi-router", native))]
pub use reinhardt_openapi::OpenApiRouter;
#[cfg(all(feature = "shortcuts", native))]
pub use reinhardt_shortcuts::{redirect, render_html, render_json, render_text};
#[cfg(all(feature = "shortcuts", feature = "database", native))]
pub use reinhardt_shortcuts::{get_list_or_404, get_object_or_404};
#[cfg(native)]
pub use reinhardt_urls::routers::{
UrlPattern, UrlPatternWithParams, UrlReverser, include_routes as include, path, re_path,
reverse,
};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::contenttypes::{
CONTENT_TYPE_REGISTRY, ContentType, ContentTypeRegistry, GenericForeignKey, GenericRelatable,
GenericRelationQuery, ModelType,
};
#[cfg(all(feature = "database", native))]
pub use reinhardt_db::migrations::{
FieldState, Migration, MigrationAutodetector, MigrationError, MigrationPlan, MigrationRecorder,
ModelState, ProjectState,
};
#[cfg(all(feature = "cache", native))]
pub use reinhardt_utils::cache::{Cache, CacheKeyBuilder, InMemoryCache};
#[cfg(all(feature = "middleware", native))]
pub use reinhardt_middleware::CacheMiddleware;
#[cfg(all(feature = "cache", feature = "redis-backend", native))]
pub use reinhardt_utils::cache::RedisCache;
#[cfg(all(feature = "sessions", native))]
pub use reinhardt_auth::sessions::{
CacheSessionBackend, InMemorySessionBackend, Session, SessionBackend, SessionError,
};
#[cfg(all(feature = "sessions", feature = "middleware", native))]
pub use reinhardt_auth::sessions::{HttpSessionConfig, SameSite, SessionMiddleware};
#[cfg(all(feature = "forms", native))]
pub use reinhardt_forms::{
BoundField, CharField, EmailField, FieldError, FileField, Form, FormError, FormResult,
IntegerField, ModelForm,
};
#[cfg(all(feature = "di", native))]
#[allow(deprecated)]
pub use reinhardt_di::injected::{Injected, OptionalInjected};
#[cfg(all(feature = "di", native))]
pub use reinhardt_di::scope::{RequestScope, Scope, SingletonScope};
#[cfg(all(feature = "di", native))]
pub use reinhardt_di::{
Depends, DependsBuilder, DiError, DiResult, Injectable, InjectionContext,
InjectionContextBuilder, InjectionMetadata, RequestContext,
};
#[cfg(all(any(feature = "minimal", feature = "standard", feature = "di"), native))]
pub use reinhardt_di::params::{Body, Cookie, Header, Json, Path, Query};
#[cfg(all(feature = "tasks", native))]
pub use reinhardt_tasks::{Scheduler, Task, TaskExecutor, TaskQueue};
#[cfg(all(feature = "test", native))]
pub use reinhardt_test::{APIClient, APIRequestFactory, APITestCase, TestResponse};
#[cfg(all(feature = "storage", native))]
pub use reinhardt_utils::storage::{InMemoryStorage, LocalStorage, Storage};
#[cfg(all(not(native), target_family = "wasm"))]
pub mod prelude {
#[cfg(feature = "client-router")]
pub use crate::urls::prelude::UnifiedRouter;
}
#[cfg(native)]
pub mod prelude {
pub use crate::{
Action,
DefaultRouter,
DetailView,
ListView,
ModelViewSet,
MultipleObjectMixin,
ReadOnlyModelViewSet,
Route,
Router,
ServerRouter,
SingleObjectMixin,
StatusCode,
View,
ViewSet,
clear_router,
get_router,
is_router_registered,
register_router,
};
#[cfg(feature = "core")]
pub use crate::ViewResult;
#[cfg(feature = "client-router")]
pub use crate::UnifiedRouter;
#[cfg(feature = "core")]
pub use crate::core::async_trait;
#[cfg(feature = "core")]
pub use crate::core::serde::{Deserialize, Serialize};
#[cfg(feature = "core")]
pub use crate::{
Error, Handler, Middleware, MiddlewareChain, Request, Response, Result, Signal,
m2m_changed, post_delete, post_save, pre_delete, pre_save,
};
pub use crate::{api_view, delete, get, patch, post, put};
#[cfg(feature = "database")]
pub use crate::{
Aggregate,
Annotation,
CheckConstraint,
Concat,
CurrentDate,
DatabaseConnection,
DenseRank,
F,
ForeignKeyConstraint,
Lower,
Now,
Q,
QOperator,
Rank,
RowNumber,
SoftDeletable,
Timestamped,
Transaction,
UniqueConstraint,
Upper,
Window,
atomic,
model,
};
#[cfg(feature = "database")]
pub use reinhardt_db::orm::Model;
#[cfg(feature = "auth")]
pub use crate::{
AuthBackend,
Group,
GroupManager,
ObjectPermission,
ObjectPermissionChecker,
PasswordHasher,
Permission,
SimpleUser,
UserManager,
};
#[cfg(any(feature = "minimal", feature = "standard", feature = "di"))]
pub use crate::{Body, Cookie, Header, Json, Path, Query};
#[cfg(feature = "rest")]
pub use crate::{
AcceptHeaderVersioning,
AnonRateThrottle,
CursorPagination,
FormParser,
JSONParser,
JsonSerializer,
LimitOffsetPagination,
MultiPartParser,
MultiTermSearch,
PageNumberPagination,
Paginator,
Parser,
QueryParameterVersioning,
ScopedRateThrottle,
Serializer,
SimpleMetadata,
Throttle,
URLPathVersioning,
UserRateThrottle,
VersioningMiddleware,
};
#[cfg(feature = "conf")]
#[allow(deprecated)] pub use crate::Settings;
#[cfg(any(feature = "standard", feature = "middleware"))]
pub use crate::LoggingMiddleware;
#[cfg(feature = "middleware-security")]
pub use crate::SecurityMiddleware;
#[cfg(all(feature = "sessions", feature = "middleware", native))]
pub use crate::AuthenticationMiddleware;
#[cfg(feature = "sessions")]
pub use crate::Session;
#[cfg(feature = "cache")]
pub use crate::{Cache, InMemoryCache};
}
#[cfg(all(feature = "websockets-pages", native))]
pub use reinhardt_websockets::integration::pages::PagesAuthenticator;
#[cfg(all(feature = "websockets", native))]
pub use reinhardt_websockets::room::{BroadcastResult, Room, RoomError, RoomManager, RoomResult};
#[cfg(all(feature = "websockets", native))]
pub use reinhardt_websockets::{
ConsumerContext, Message, WebSocketConnection, WebSocketConsumer, WebSocketError,
WebSocketResult,
};
#[cfg(all(feature = "websockets", native))]
pub use reinhardt_websockets::{
RouteError, RouteResult, WebSocketRoute, WebSocketRouter, clear_websocket_router,
get_websocket_router, register_websocket_router, reverse_websocket_url,
};
#[cfg(not(native))]
pub struct WebSocketRouter {
_private: (),
}
#[cfg(not(native))]
impl WebSocketRouter {
pub fn new() -> Self {
Self { _private: () }
}
pub fn with_namespace(self, _namespace: impl Into<String>) -> Self {
self
}
pub fn consumer<C, F>(self, _f: F) -> Self
where
F: Fn() -> C,
{
self
}
}
#[cfg(not(native))]
impl Default for WebSocketRouter {
fn default() -> Self {
Self::new()
}
}
#[cfg(all(feature = "database", native))]
pub mod query;
#[cfg(all(feature = "database", native))]
pub mod db {
pub use reinhardt_db::DatabaseConnection;
pub use reinhardt_db::DatabaseError as Error;
pub mod migrations {
pub use reinhardt_db::migrations::*;
}
pub mod orm {
pub use reinhardt_db::orm::*;
}
pub mod associations {
pub use reinhardt_db::associations::*;
}
pub mod prelude {
pub use reinhardt_db::prelude::*;
}
}