Module prelude

Module prelude 

Source
Expand description

Re-exports of commonly used types and traits

Re-exports§

pub use crate::core::auth::AuthContext;
pub use crate::core::auth::AuthPolicy;
pub use crate::core::auth::AuthProvider;
pub use crate::core::auth::NoAuthProvider;
pub use crate::core::entity::Data;
pub use crate::core::entity::Entity;
pub use crate::core::field::FieldFormat;
pub use crate::core::field::FieldValue;
pub use crate::core::link::LinkAuthConfig;
pub use crate::core::link::LinkDefinition;
pub use crate::core::link::LinkEntity;
pub use crate::core::module::EntityCreator;
pub use crate::core::module::EntityFetcher;
pub use crate::core::module::Module;
pub use crate::core::pluralize::Pluralizer;
pub use crate::core::query::PaginatedResponse;
pub use crate::core::query::PaginationMeta;
pub use crate::core::query::QueryParams;
pub use crate::core::service::DataService;
pub use crate::core::service::LinkService;
pub use crate::core::store::QueryableStore;
pub use crate::core::validation::EntityValidationConfig;
pub use crate::core::validation::Validated;
pub use crate::links::handlers::AppState;
pub use crate::links::registry::LinkDirection;
pub use crate::links::registry::LinkRouteRegistry;
pub use crate::links::registry::RouteInfo;
pub use crate::storage::InMemoryLinkService;
pub use crate::config::EntityAuthConfig;
pub use crate::config::EntityConfig;
pub use crate::config::LinksConfig;
pub use crate::config::ValidationRule;
pub use crate::server::EntityDescriptor;
pub use crate::server::EntityRegistry;
pub use crate::server::ServerBuilder;

Macros§

add_filters_for_field
Helper macro to add filters to a field
add_validators_for_field
Helper macro to add validators to a field
data_fields
Macro to inject Data fields into a struct (Entity fields + name)
entity_fields
Macro to inject Entity base fields into a struct
impl_data_entity
Complete macro to create a Data entity with automatic trait implementations
impl_data_entity_validated
Extended macro to create a Data entity with validation and filtering
impl_link_entity
Complete macro to create a Link entity with automatic trait implementations
link_fields
Macro to inject Link fields into a struct (Entity fields + source_id + target_id + link_type)

Structs§

DateTime
ISO 8601 combined date and time with time zone.
HeaderMap
A set of HTTP headers
Path
Extractor that will get captures from the URL and parse them using serde.
Router
The router type for composing handlers and services.
State
Extractor for state.
Utc
The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).
Uuid
A Universally Unique Identifier (UUID).

Traits§

Deserialize
A data structure that can be deserialized from any data format supported by Serde.
Serialize
A data structure that can be serialized into any data format supported by Serde.

Functions§

delete
Route DELETE requests to the given handler.
get
Route GET requests to the given handler.
post
Route POST requests to the given handler.
put
Route PUT requests to the given handler.

Type Aliases§

Result
Result<T, Error>

Attribute Macros§

async_trait

Derive Macros§

Deserialize
Serialize