#![warn(missing_docs)]
#![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
}
}
}
pub use reinhardt_core::model_info;
#[cfg(all(feature = "di", native))]
#[doc(hidden)]
pub mod reinhardt_di {
pub use reinhardt_di::*;
}
#[cfg(all(feature = "auth", native))]
pub mod auth {
pub use reinhardt_auth::*;
}
#[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::endpoint::EndpointMetadata;
pub use reinhardt_core::*;
}
#[cfg(all(feature = "core", 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(all(feature = "core", 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(feature = "test")]
pub mod test;
#[cfg(all(feature = "routing", native))]
pub mod urls;
#[cfg(all(feature = "routing", not(native)))]
pub mod urls {
pub mod prelude {
#[cfg(feature = "client-router")]
pub use reinhardt_urls::routers::{ClientRouter, ServerRouter, UnifiedRouter};
#[cfg(not(feature = "client-router"))]
pub use stub::*;
#[cfg(not(feature = "client-router"))]
mod stub {
pub struct ServerRouter;
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(ServerRouter) -> ServerRouter,
{
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(all(
any(feature = "cache", feature = "static-files", feature = "storage"),
native
))]
pub mod utils;
#[cfg(all(
any(feature = "api", feature = "standard", feature = "api-only"),
native
))]
pub mod views;
mod exports;
pub use exports::*;
#[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(all(feature = "core", native))]
#[doc(hidden)]
pub use inventory;
#[cfg(all(feature = "routing", target_family = "wasm", target_os = "unknown"))]
#[doc(hidden)]
pub use reinhardt_urls::inventory;
#[cfg(feature = "routing")]
#[doc(hidden)]
pub use ::reinhardt_urls;
pub mod prelude;
#[cfg(not(native))]
mod compat;
#[cfg(not(native))]
pub use compat::websockets::WebSocketRouter;
#[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::*;
}
}
#[cfg(not(native))]
pub mod db {
pub mod associations {
use std::marker::PhantomData;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ForeignKeyField<T>(PhantomData<T>);
impl<T> Default for ForeignKeyField<T> {
fn default() -> Self {
Self(PhantomData)
}
}
impl<T> ForeignKeyField<T> {
pub const fn new() -> Self {
Self(PhantomData)
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ManyToManyField<Source, Target, S = ()>(PhantomData<(Source, Target, S)>);
impl<Source, Target, S> Default for ManyToManyField<Source, Target, S> {
fn default() -> Self {
Self(PhantomData)
}
}
impl<Source, Target, S> ManyToManyField<Source, Target, S> {
pub const fn new() -> Self {
Self(PhantomData)
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OneToOneField<T>(PhantomData<T>);
impl<T> Default for OneToOneField<T> {
fn default() -> Self {
Self(PhantomData)
}
}
impl<T> OneToOneField<T> {
pub const fn new() -> Self {
Self(PhantomData)
}
}
}
}