pub trait OfdModel: Sized {
// Required methods
fn schema() -> &'static [OfdField];
fn to_page(&self) -> OfdResult<OfdPage>;
// Provided methods
fn page_size() -> (f64, f64) { ... }
fn to_pages(items: &[Self]) -> OfdResult<Vec<OfdPage>> { ... }
}Expand description
The OfdModel trait defines the contract for Rust types that can be
mapped to OFD page content.
This is the OFD equivalent of ExcelRow in easyexcel-rs.
Derive it with #[derive(OfdModel)] for automatic implementation.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".