rustio-admin 0.22.0

Django Admin, but for Rust. A small, focused admin framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
# RustIO — Public API enumeration

_This document is descriptive, not normative. Annotation does not itself guarantee SemVer stability before 1.0._

Generated from `// public:` annotations across the workspace.

**Total items: 355**

---

## crate `rustio_admin`

### `rustio_admin`

- `pub mod admin;`
- `pub mod auth;`
- `pub mod background;`
- `pub mod email;`
- `pub mod error;`
- `pub mod http;`
- `pub mod middleware;`
- `pub mod migrations;`
- `pub mod orm;`
- `pub mod router;`
- `pub mod server;`
- `pub mod templates;`
- `pub use crate::admin::`
- `pub use crate::auth::`
- `pub use crate::error::`
- `pub use crate::http::`
- `pub use crate::orm::`
- `pub use crate::router::`
- `pub use crate::server::Server;`
- `pub use rustio_admin_macros::RustioAdmin;`

### `rustio_admin::admin`

- `pub mod audit;`
- `pub mod bulk;`
- `pub mod filters;`
- `pub mod modeladmin;`
- `pub mod redact;`
- `pub mod relations;`
- `pub use audit::`
- `pub use bulk::{BulkActionContext, BulkActionFailure, BulkActionResult};`
- `pub use filters::`
- `pub use modeladmin::`
- `pub use redact::`
- `pub use relations::`
- `pub use routes::register_admin_routes;`
- `pub use types::`

### `rustio_admin::admin::bulk`

- `pub struct BulkActionContext<'a>``#[non_exhaustive]`; fields `actor: &'a Identity`, `correlation_id: Option<&'a str>`, `ip_address: Option<&'a str>`.
- `pub fn new(actor: &'a Identity) -> Self`
- `pub struct BulkActionResult``#[non_exhaustive]`; fields `succeeded: usize`, `failed: Vec<BulkActionFailure>`, `message: Option<String>`.
- `pub fn ok(succeeded: usize) -> Self`
- `pub fn partial(succeeded: usize, failed: Vec<BulkActionFailure>) -> Self`
- `pub fn total(&self) -> usize`
- `pub fn with_message(mut self, message: impl Into<String>) -> Self`
- `pub struct BulkActionFailure``#[non_exhaustive]`; fields `id: i64`, `reason: String`.
- `pub fn new(id: i64, reason: impl Into<String>) -> Self`

### `rustio_admin::admin::audit`

- `pub async fn ensure_table(db: &Db) -> Result<()>`
- `pub enum ActionType`
- `pub fn as_str(self) -> &'static str`
- `pub fn parse(s: &str) -> Option<Self>`
- `pub fn label(self) -> &'static str`
- `pub fn pill_class(self) -> &'static str`
- `pub struct AdminAction`
- `pub struct LogEntry<'a>`
- `pub fn new(user_id: i64, action_type: ActionType, model_name: &'a str, object_id: i64) -> Self`
- `pub fn with_actor(mut self, actor_user_id: i64) -> Self`
- `pub fn with_event(mut self, event: AuditEvent) -> Self`
- `pub async fn record(db: &Db, entry: LogEntry<'_>) -> Result<()>`
- `pub enum AuditEvent`
- `pub const fn as_str(self) -> &'static str`
- `pub async fn recent(`
- `pub async fn for_object(db: &Db, model_name: &str, object_id: i64) -> Result<Vec<AdminAction>>`

### `rustio_admin::admin::filters`

- `pub enum FieldRole`
- `pub fn is_sensitive(self) -> bool`
- `pub struct FieldUI`
- `pub enum FilterKind`
- `pub struct FilterDef`
- `pub fn classify_field(f: &AdminField) -> FieldRole`
- `pub fn field_ui_metadata(f: &AdminField) -> FieldUI`
- `pub fn field_ui_metadata_with_relation(f: &AdminField, relation_target: Option<&str>) -> FieldUI`
- `pub fn format_relation_cell(id: i64, target: Option<&str>) -> String`
- `pub fn infer_filters(fields: &[AdminField]) -> Vec<FilterDef>`
- `pub fn infer_filters_with_relations<F>(`
- `pub fn mask_pii(value: &str) -> String`

### `rustio_admin::admin::modeladmin`

- `pub struct Fieldset`
- `pub trait ModelAdmin: AdminModel`
- `fn execute_bulk_action<'a>(action: &'a str, ids: &'a [i64], db: &'a Db, ctx: &'a BulkActionContext<'a>) -> Pin<Box<dyn Future<Output = Result<BulkActionResult>> + Send + 'a>>` — default returns `BadRequest` with the action name; projects override to dispatch declared `bulk_actions()`.
- `pub struct BulkAction`
- `pub enum SortDir`
- `pub fn sql(self) -> &'static str`
- `pub fn parse_order_spec(spec: &str) -> (String, SortDir)`

### `rustio_admin::admin::redact`

- `pub const fn redact_password() -> &'static str`
- `pub fn redact_token(token: &str) -> String`
- `pub const fn redact_mfa_secret() -> &'static str`
- `pub const fn redact_backup_code() -> &'static str`

### `rustio_admin::admin::relations`

- `pub const RELATION_FILTER_DROPDOWN_CAP: usize = 500;`
- `pub struct ResolvedRelation`
- `pub struct InverseRelation`
- `pub enum RegistryError`
- `pub struct RelationRegistry`
- `pub fn empty() -> Self`
- `pub fn from_admin_entries(entries: &[AdminEntry]) -> Self`
- `pub fn belongs_to(&self, model: &str, field: &str) -> Option<&ResolvedRelation>`
- `pub fn belongs_to_of(&self, model: &str) -> &[ResolvedRelation]`
- `pub fn has_many(&self, model: &str) -> &[InverseRelation]`
- `pub fn is_empty(&self) -> bool`
- `pub fn validate(&self, entries: &[AdminEntry]) -> Vec<RegistryError>`
- `pub fn iter_belongs_to(&self) -> impl Iterator<Item = &ResolvedRelation>`

### `rustio_admin::admin::routes`

- `pub fn register_admin_routes(`

### `rustio_admin::admin::types`

- `pub struct UserProfileSection`
- `pub struct UserProfileRow`
- `pub enum FieldType`
- `pub fn widget(&self) -> &'static str`
- `pub fn nullable(&self) -> bool`
- `pub struct AdminField`
- `pub struct AdminRelation`
- `pub trait AdminModel: Send + Sync + 'static`
- `pub struct AdminEntry`
- `pub struct ListOpts`
- `pub struct ListPage`
- `pub struct ListRow`
- `pub struct CellLink`
- `pub struct EditRow`
- `pub struct SiteBranding`
- `pub struct AdminTheme`
- `pub fn new() -> Self`
- `pub fn accent(mut self, color: impl Into<String>) -> Self`
- `pub fn bg(mut self, color: impl Into<String>) -> Self`
- `pub fn surface(mut self, color: impl Into<String>) -> Self`
- `pub fn text(mut self, color: impl Into<String>) -> Self`
- `pub fn text_muted(mut self, color: impl Into<String>) -> Self`
- `pub fn border(mut self, color: impl Into<String>) -> Self`
- `pub struct Admin`
- `pub fn new() -> Self`
- `pub fn site_branding(mut self, branding: SiteBranding) -> Self`
- `pub fn branding(&self) -> &SiteBranding`
- `pub fn accent_color(mut self, color: impl Into<String>) -> Self`
- `pub fn theme(mut self, theme: AdminTheme) -> Self`
- `pub fn accent(&self) -> Option<&str>`
- `pub fn active_theme(&self) -> &AdminTheme`
- `pub fn mailer(mut self, mailer: SharedMailer) -> Self`
- `pub fn active_mailer(&self) -> &SharedMailer`
- `pub fn has_custom_mailer(&self) -> bool`
- `pub fn password_policy(mut self, policy: SharedPasswordPolicy) -> Self`
- `pub fn active_password_policy(&self) -> &SharedPasswordPolicy`
- `pub fn recovery_policy(mut self, policy: SharedRecoveryPolicy) -> Self`
- `pub fn active_recovery_policy(&self) -> &SharedRecoveryPolicy`
- `pub fn require_mfa(mut self, policy: MfaPolicy) -> Self`
- `pub fn active_mfa_policy(&self) -> MfaPolicy`
- `pub fn model<M>(mut self) -> Self`
- `pub fn entries(&self) -> &[AdminEntry]`
- `pub fn user_profile_extension<F, Fut>(mut self, ext: F) -> Self`
- `pub fn find(&self, admin_name: &str) -> Option<&AdminEntry>`
- `pub async fn seed_permissions(&self, db: &crate::orm::Db) -> crate::error::Result<()>`

### `rustio_admin::auth`

- `pub mod emergency;`
- `pub mod guards;`
- `pub use mfa::MfaPolicy;`
- `pub use permissions::`
- `pub use recovery::`
- `pub use role::`
- `pub use sessions::`
- `pub use users::would_orphan_developers;`
- `pub use users::`
- `pub async fn init_tables(db: &Db) -> Result<()>`

### `rustio_admin::auth::emergency`

- `pub enum ResetOutcome`
- `pub enum UnlockOutcome`
- `pub enum DisableMfaOutcome`
- `pub enum PromoteOutcome`
- `pub enum EmergencyAccessOutcome`
- `pub async fn reset_password(`
- `pub async fn unlock(db: &Db, target_user_id: i64) -> Result<UnlockOutcome>`
- `pub async fn disable_mfa(db: &Db, target_user_id: i64) -> Result<DisableMfaOutcome>`
- `pub async fn promote(db: &Db, target_user_id: i64, new_role: Role) -> Result<PromoteOutcome>`
- `pub async fn emergency_access(`
- `pub fn generate_temp_password(len: usize) -> String`
- `pub fn fresh_correlation_id() -> String`

### `rustio_admin::auth::guards`

- `pub fn enforce_self_demote_safe(`
- `pub fn enforce_cross_rank_safe(actor: &Identity, target_id: i64, target_role: Role) -> Result<()>`
- `pub fn enforce_role_ceiling(actor: &Identity, requested_role: Role) -> Result<()>`
- `pub async fn enforce_no_orphan_role(`

### `rustio_admin::auth::mfa`

- `pub enum MfaPolicy`

### `rustio_admin::auth::permissions`

- `pub struct Superuser;`
- `pub struct Permission`
- `pub enum PermissionError`
- `pub async fn init_permission_tables(db: &Db) -> Result<()>`
- `pub async fn permissions_for_user(db: &Db, user_id: i64) -> Result<Arc<HashSet<String>>>`
- `pub async fn check_permission(db: &Db, identity: &Identity, permission: &str) -> Result<bool>`
- `pub async fn grant_to_user(db: &Db, user_id: i64, permission: &str) -> Result<()>`
- `pub async fn grant_to_group(db: &Db, group_id: i64, permission: &str) -> Result<()>`
- `pub async fn create_group(db: &Db, name: &str, description: &str) -> Result<i64>`
- `pub async fn add_user_to_group(db: &Db, user_id: i64, group_id: i64) -> Result<()>`
- `pub async fn remove_user_from_group(db: &Db, user_id: i64, group_id: i64) -> Result<()>`
- `pub async fn register_model_permissions(db: &Db, app: &str, singular: &str) -> Result<()>`

### `rustio_admin::auth::recovery`

- `pub trait PasswordPolicy: Send + Sync`
- `pub type SharedPasswordPolicy = Arc<dyn PasswordPolicy>;`
- `pub enum PasswordPolicyError`
- `pub struct DefaultPasswordPolicy`
- `pub const fn new() -> Self`
- `pub const fn with_min_len(min_len: usize) -> Self`
- `pub struct LoginThrottle`
- `pub const DEFAULT: Self = Self`
- `pub trait RecoveryPolicy: Send + Sync`
- `pub type SharedRecoveryPolicy = Arc<dyn RecoveryPolicy>;`
- `pub struct DefaultRecoveryPolicy`
- `pub fn new() -> Self`
- `pub fn with_reset_token_ttl(mut self, ttl: ChronoDuration) -> Self`
- `pub fn with_request_rate_limit(mut self, capacity: u32, window: StdDuration) -> Self`
- `pub fn with_consume_rate_limit(mut self, capacity: u32, window: StdDuration) -> Self`
- `pub fn with_strict_mailer_required(mut self, required: bool) -> Self`

### `rustio_admin::auth::role`

- `pub enum Role`
- `pub const fn rank(self) -> u32`
- `pub fn includes(self, other: Role) -> bool`
- `pub fn as_str(self) -> &'static str`
- `pub fn label(self) -> &'static str`
- `pub fn parse(s: &str) -> Result<Self>`
- `pub fn can_access_panel(self) -> bool`
- `pub fn bypasses_group_checks(self) -> bool`
- `pub const fn protected_roles() -> &'static [Role]`

### `rustio_admin::auth::sessions`

- `pub const SESSION_COOKIE: &str = "rustio_session";`
- `pub enum SessionTrust`
- `pub const fn as_str(self) -> &'static str`
- `pub const fn rank(self) -> u8`
- `pub const fn satisfies(self, other: SessionTrust) -> bool`
- `pub fn parse(s: &str) -> Self`
- `pub enum SessionInvalidationReason`
- `pub const fn as_str(self) -> &'static str`
- `pub enum SessionTarget`
- `pub struct Session`
- `pub struct InvalidationOutcome`
- `pub async fn init_session_tables(db: &Db) -> Result<()>`
- `pub async fn create_session(db: &Db, user_id: i64) -> Result<String>`
- `pub async fn delete_session(db: &Db, token: &str) -> Result<()>`
- `pub async fn invalidate_sessions(`
- `pub async fn logout_session(db: &Db, token: &str) -> Result<()>`
- `pub async fn list_active_for_user(db: &Db, user_id: i64) -> Result<Vec<Session>>`
- `pub async fn current_session_id(db: &Db, token: &str) -> Result<Option<i64>>`
- `pub async fn identity_from_session(db: &Db, token: &str) -> Result<Option<Identity>>`
- `pub async fn purge_expired_sessions(db: &Db) -> Result<u64>`
- `pub fn session_token_from_cookie(cookie_header: &str) -> Option<String>`

### `rustio_admin::auth::users`

- `pub struct Identity`
- `pub fn is_admin(&self) -> bool`
- `pub fn can_access_admin(&self) -> bool`
- `pub struct StoredUser`
- `pub struct UserProfile`
- `pub async fn init_user_tables(db: &Db) -> Result<()>`
- `pub async fn migrate_user_schema(db: &Db) -> Result<()>`
- `pub fn hash_password(plain: &str) -> Result<String>`
- `pub fn verify_password(plain: &str, stored_hash: &str) -> bool`
- `pub async fn create_user(db: &Db, email: &str, password: &str, role: Role) -> Result<i64>`
- `pub async fn find_user_by_email(db: &Db, email: &str) -> Result<Option<StoredUser>>`
- `pub async fn load_user_profile(db: &Db, user_id: i64) -> Result<Option<UserProfile>>`
- `pub async fn set_password(db: &Db, user_id: i64, new_password: &str) -> Result<()>`
- `pub async fn update_user_role(db: &Db, user_id: i64, role: Role) -> Result<()>`
- `pub fn verdict_for_orphan_role(`
- `pub async fn would_orphan_role(`
- `pub async fn would_orphan_protected(`
- `pub async fn would_orphan_developers(`
- `pub async fn login(db: &Db, email: &str, password: &str) -> Result<String>`

### `rustio_admin::background`

- `pub fn spawn_housekeeping(db: Db)`
- `pub fn spawn_session_sweeper(db: Db)`

### `rustio_admin::email`

- `pub struct Mail`
- `pub fn framework_envelope(`
- `pub enum MailerError`
- `pub trait Mailer: Send + Sync`
- `pub struct LogMailer;`
- `pub fn new() -> Self`
- `pub type SharedMailer = Arc<dyn Mailer>;`

### `rustio_admin::error`

- `pub type Result<T> = std::result::Result<T, Error>;`
- `pub enum Error`
- `pub fn status(&self) -> u16`
- `pub fn client_message(&self) -> &str`

### `rustio_admin::http`

- `pub struct Context`
- `pub fn insert<T: Any + Send + Sync>(&mut self, value: T)`
- `pub fn get<T: Any + Send + Sync>(&self) -> Option<&T>`
- `pub fn get_mut<T: Any + Send + Sync>(&mut self) -> Option<&mut T>`
- `pub struct Request`
- `pub fn method(&self) -> &Method`
- `pub fn path(&self) -> &str`
- `pub fn query_string(&self) -> &str`
- `pub fn query(&self) -> FormData`
- `pub fn header(&self, name: &str) -> Option<&str>`
- `pub fn param(&self, name: &str) -> Option<&str>`
- `pub fn body(&self) -> &[u8]`
- `pub fn body_text(&self) -> Result<&str>`
- `pub fn form(&self) -> Result<FormData>`
- `pub fn ctx(&self) -> &Context`
- `pub fn ctx_mut(&mut self) -> &mut Context`
- `pub struct FormData`
- `pub fn from_urlencoded(input: &str) -> Self`
- `pub fn get(&self, key: &str) -> Option<&str>`
- `pub fn required(&self, key: &str) -> Result<&str>`
- `pub fn bool_flag(&self, key: &str) -> bool`
- `pub fn contains(&self, key: &str) -> bool`
- `pub fn as_map(&self) -> &HashMap<String, String>`
- `pub struct Response`
- `pub fn new(status: StatusCode, body: impl Into<Bytes>) -> Self`
- `pub fn ok(body: impl Into<Bytes>) -> Self`
- `pub fn html(body: impl Into<String>) -> Self`
- `pub fn json_raw(body: impl Into<String>) -> Self`
- `pub fn redirect(to: impl Into<String>) -> Self`
- `pub fn text(body: impl Into<String>) -> Self`
- `pub fn with_header(mut self, name: impl Into<String>, value: impl Into<String>) -> Self`
- `pub fn with_status(mut self, status: StatusCode) -> Self`

### `rustio_admin::middleware`

- `pub use compression::gzip;`
- `pub use correlation_id::`
- `pub use csrf::`
- `pub use logger::logger;`
- `pub use rate_limit::`
- `pub use security_headers::security_headers;`

### `rustio_admin::middleware::compression`

- `pub async fn gzip(req: Request, next: Next) -> Result<Response>`

### `rustio_admin::middleware::correlation_id`

- `pub const CORRELATION_ID_HEADER: &str = "x-correlation-id";`
- `pub struct CorrelationId(pub String);`
- `pub fn as_str(&self) -> &str`
- `pub async fn correlation_id(mut req: Request, next: Next) -> Result<Response>`

### `rustio_admin::middleware::csrf`

- `pub const CSRF_COOKIE: &str = "rustio_csrf";`
- `pub const CSRF_HEADER: &str = "x-csrf-token";`
- `pub const CSRF_FIELD: &str = "_csrf";`
- `pub struct CsrfGuard`
- `pub async fn csrf_protect(mut req: Request, next: Next) -> Result<Response>`

### `rustio_admin::middleware::logger`

- `pub async fn logger(req: Request, next: Next) -> Result<Response>`

### `rustio_admin::middleware::rate_limit`

- `pub struct RateLimiter`
- `pub fn new(capacity: u32, window: Duration) -> Self`
- `pub fn default_limits() -> Self`
- `pub fn rate_limit(`

### `rustio_admin::middleware::security_headers`

- `pub async fn security_headers(req: Request, next: Next) -> Result<Response>`

### `rustio_admin::migrations`

- `pub struct MigrationFile`
- `pub struct ApplyOptions`
- `pub async fn apply(db: &Db, dir: impl AsRef<Path>) -> Result<Vec<String>>`
- `pub async fn apply_with(db: &Db, dir: impl AsRef<Path>, opts: ApplyOptions) -> Result<Vec<String>>`
- `pub async fn applied_versions(db: &Db) -> Result<Vec<i64>>`
- `pub async fn status(db: &Db, dir: impl AsRef<Path>) -> Result<Vec<(String, bool)>>`
- `pub fn generate(dir: impl AsRef<Path>, name: &str) -> Result<PathBuf>`

### `rustio_admin::orm`

- `pub struct Db`
- `pub async fn connect(url: &str) -> Result<Self>`
- `pub async fn connect_with(url: &str, opts: DbOptions) -> Result<Self>`
- `pub fn pool(&self) -> &PgPool`
- `pub async fn health_check(&self) -> Result<()>`
- `pub struct DbOptions`
- `pub enum Value`
- `pub struct Row<'a>`
- `pub fn from_pg(row: &'a PgRow) -> Self`
- `pub fn get_i32(&self, col: &str) -> Result<i32>`
- `pub fn get_i64(&self, col: &str) -> Result<i64>`
- `pub fn get_optional_i64(&self, col: &str) -> Result<Option<i64>>`
- `pub fn get_bool(&self, col: &str) -> Result<bool>`
- `pub fn get_string(&self, col: &str) -> Result<String>`
- `pub fn get_optional_string(&self, col: &str) -> Result<Option<String>>`
- `pub fn get_datetime(&self, col: &str) -> Result<DateTime<Utc>>`
- `pub fn get_optional_datetime(&self, col: &str) -> Result<Option<DateTime<Utc>>>`
- `pub fn get_uuid(&self, col: &str) -> Result<Uuid>`
- `pub fn get_json(&self, col: &str) -> Result<JsonValue>`
- `pub trait Model: Send + Sync + Sized + 'static`
- `pub async fn all<M: Model>(db: &Db) -> Result<Vec<M>>`
- `pub async fn page<M: Model>(db: &Db, limit: i64, offset: i64) -> Result<Vec<M>>`
- `pub async fn count<M: Model>(db: &Db) -> Result<i64>`
- `pub async fn find<M: Model>(db: &Db, id: i64) -> Result<Option<M>>`
- `pub async fn create<M: Model>(db: &Db, model: &M) -> Result<i64>`
- `pub async fn update<M: Model>(db: &Db, id: i64, model: &M) -> Result<()>`
- `pub async fn delete<M: Model>(db: &Db, id: i64) -> Result<()>`

### `rustio_admin::router`

- `pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;`
- `pub type HandlerFn =`
- `pub type MiddlewareFn =`
- `pub struct Next`
- `pub fn run(mut self, req: Request) -> BoxFuture<'static, Result<Response>>`
- `pub struct Router`
- `pub fn new() -> Self`
- `pub fn middleware<F, Fut>(mut self, mw: F) -> Self`
- `pub fn get<F, Fut>(self, path: &str, handler: F) -> Self`
- `pub fn post<F, Fut>(self, path: &str, handler: F) -> Self`
- `pub fn route<F, Fut>(mut self, method: Method, path: &str, handler: F) -> Self`
- `pub async fn dispatch(&self, mut req: Request) -> Response`

### `rustio_admin::server`

- `pub struct Server`
- `pub fn new(router: Router, addr: SocketAddr) -> Self`
- `pub async fn run(self) -> Result<()>`
- `pub async fn serve_static(root: std::path::PathBuf, name: &str) -> Result<Response>`

### `rustio_admin::templates`

- `pub struct Templates`
- `pub fn new(project_templates_dir: Option<PathBuf>) -> Result<Arc<Self>>`
- `pub fn render<S: Serialize>(&self, name: &str, ctx: &S) -> Result<String>`
- `pub fn render_for_model<S: Serialize>(`

## crate `rustio_admin_macros`

### `rustio_admin_macros`

- `pub fn derive_rustio_admin(input: TokenStream) -> TokenStream`