tablo-core 0.3.0

The core toolkit types for Tablo, a server-rendered admin toolkit on Topcoat and Toasty.
Documentation
#[test]
fn create_form_multipart_predicate_follows_file_upload() {
    // Core owns the "does the form hold a file field"
    // predicate `render_form_page` maps to `enctype="multipart/form-data"`.
    use crate::schema::{Field, Schema};

    #[derive(Debug, toasty::Model, Clone)]
    struct Doc {
        #[key]
        #[auto]
        id: uuid::Uuid,
        path: String,
        title: String,
    }
    let with_file = Schema::new(Field::file(Doc::fields().path()));
    let without_file = Schema::new(Field::text(Doc::fields().title()));
    assert!(
        with_file.fields().any(|field| field.is_file()),
        "file schema must report an upload"
    );
    assert!(
        !without_file.fields().any(|field| field.is_file()),
        "plain schema must report no upload"
    );
}