Skip to main content

Crate ignite_core

Crate ignite_core 

Source
Expand description

Engine, resource traits and the database context for Ignite.

A resource describes one table the admin panel manages: its form fields, its list columns, and the queries that list, find, create, update and delete its rows. The ignite-panel crate turns a set of resources into Rocket routes.

Re-exports§

pub use condition::FieldConditions;
pub use condition::FormContext;
pub use condition::Operation;
pub use editor::editor_script;
pub use editor::register_editor;
pub use field::Block;
pub use field::Column;
pub use field::Field;
pub use field::FieldKind;
pub use form::FieldErrors;
pub use form::FormInput;
pub use media::media_library;
pub use media::register_media_library;
pub use media::MediaItem;
pub use media::MediaLibrary;
pub use password::hash_password;
pub use password::verify_password;
pub use policy::policy;
pub use policy::register_policy;
pub use policy::unregister_policy;
pub use policy::ActingUser;
pub use policy::Policy;
pub use query::escape_like;
pub use query::Direction;
pub use query::ListQuery;
pub use query::Page;
pub use resource::table_name_is;
pub use resource::IgniteResource;
pub use runtime_resource::register_runtime;
pub use runtime_resource::reserve_slugs;
pub use runtime_resource::runtime_resource;
pub use runtime_resource::runtime_resources;
pub use runtime_resource::unregister_runtime;
pub use runtime_resource::BlockDef;
pub use runtime_resource::ColumnDef;
pub use runtime_resource::FieldDef;
pub use runtime_resource::FieldKindDef;
pub use runtime_resource::RegisteredResource;
pub use runtime_resource::Row;
pub use runtime_resource::RuntimeData;
pub use runtime_resource::RuntimeError;
pub use runtime_resource::RuntimeFuture;
pub use runtime_resource::RuntimeResource;
pub use runtime_resource::MAX_FIELD_NAME;
pub use widget::LatestRecords;
pub use widget::StatWidget;

Modules§

condition
Fields that show only when a condition holds, as Filament’s visible(), hidden(), visibleOn(), hiddenOn() and live().
editor
The rich text editor of FieldKind::Wysiwyg fields.
field
Form fields and table columns, as the panel renders them.
form
Submitted form values and the per-field error messages.
media
The media library that Image, File and Gallery fields pick from.
password
Argon2 password hashes. The panel’s sign-in and the derived password fields both use these functions, so every stored password has the same format.
policy
Who is acting, and what they may do with each record: the signed-in user the panel passes to a resource’s queries, and the policies that decide each action for a user and a record.
query
What the list view asks for: the page, the search text and the sort.
resource
The trait a table implements to be managed by the admin panel.
runtime_resource
Resources defined at run time, from data: their slug, fields, columns and queries are values, not a Rust type, so an app can add and remove them while the panel serves.
widget
Dashboard widgets: the stat cards and the latest-records tables a resource can show on the dashboard.

Structs§

Database
The connection pool for one database. Clone-free: share it behind an Arc or in Rocket’s state.

Derive Macros§

IgniteResource
Derives IgniteResource for an Orbit model. See ignite_macros for the attributes. Writes impl ignite_core::IgniteResource for a struct that models a table.