Skip to main content

Crate rango_core

Crate rango_core 

Source
Expand description

Core of the Rango web framework: models, routing, views, forms, and the request pipeline.

Re-exports§

pub use app::App;
pub use error::Error;
pub use forgery::Token;
pub use forgery::cookie;
pub use forgery::guard;
pub use forgery::named;
pub use forgery::token;
pub use form::Errors;
pub use form::FieldError;
pub use form::Valid;
pub use model::Model;
pub use model::Repository;
pub use model::id_column;
pub use model::key;
pub use model::related;
pub use settings::Settings;
pub use urls::Routes;
pub use view::Request;
pub use view::Response;
pub use view::View;
pub use view::get_view;
pub use view::html;
pub use view::json;
pub use view::redirect;
pub use view::render;
pub use rango_store as store;
pub use askama;
pub use chrono;
pub use rust_decimal as decimal;
pub use serde;
pub use serde_json;
pub use tokio;

Modules§

app
Application assembly and serving.
error
Error type for the request pipeline.
forgery
Cross-site request forgery protection.
form
Form extraction and validation.
model
Model trait and repository over the store.
prelude
Common imports for Rango apps.
settings
Runtime settings and the secret key.
urls
Route table builder.
view
Views: request handlers and response helpers.

Structs§

Action
A bulk row action with a name, title, and handler.
Cells
Reader over a slice of values; the cursor advances as cells are read.
Check
A named checkbox constraint.
Column
A single column: name plus affinity kind.
Field
Spec for one column of a schema.
Filter
A leaf condition on one field.
Form
URL encoded extractor and response.
Gather
Writer that captures a single value.
Json
JSON Extractor / Response.
Name
A column name.
Page
Paging window; count 0 means no limit.
Pick
A fixed set of (value, label) choices for a field.
Query
A full read: condition, sort, page, columns, optional aggregate.
Row
One fetched row, cells aligned with the query’s columns.
Schema
A table definition: name, fields, and rules.
Slots
Writer that collects every written value in order.
Sort
A sort on one field.
Table
A table name.

Enums§

ColumnKind
How a column’s cells map to Values when read back.
Key
A row key: autoincrement id or text key.
Link
Reference between tables.
Mass
Aggregate over matching rows.
Only
Which columns a query returns.
Op
Comparison operator for a Filter.
Order
Sort direction.
Rule
Repository-level constraint attached to a Schema.
StoreError
Errors surfaced by the store, backends, and value conversion.
Tree
Nested query condition.
Value
A single typed database value.
Widget
UI hint for how a field is rendered.

Traits§

Reader
Source of typed cell values during deserialization.
Show
Human presentation of a stored type: widget, parsing, and text.
Storable
A type that can be stored in a single column.
Store
A database backend: SQL and typed schema operations over a connection.
Template
Main Template trait; implementations are generally derived
Writer
Sink for typed cell values during serialization.

Functions§

get
Route GET requests to the given handler.
post
Route POST requests to the given handler.

Type Aliases§

Run
Action handler: store, schema, and target keys to a result message.

Attribute Macros§

form
Derives Deserialize and Default for a form struct, using rango::serde.
input
Derives only Deserialize for an input struct, using rango::serde.
main
Runs an async fn main on a multi-threaded tokio runtime with all features enabled.
template
Derives Template via Askama, forwarding the attribute arguments unchanged.

Derive Macros§

Model
Implements Model for a struct, mapping each field to a column.
Template
The Template derive macro and its template() attribute.