pub struct CustomLayout { /* private fields */ }Expand description
A user-defined table layout: an id and a callback that receives the
lowered rows (Vec<Vec<String>> — csv records, or a sheet’s cells as
text) and returns any Value. This is the rows-level escape hatch:
binary formats (spreadsheets) can’t go through a CustomFormat
(which parses text), but one sheet of a workbook can still get fully
custom treatment via
(Format::Excel, path, sheet, CustomLayout::new(…)).into(). Most
custom layouts end by reshaping the rows and calling
parse_table (the xlsx-sheets example
transposes a column-oriented sheet this way).
Implementations§
Trait Implementations§
Source§impl Clone for CustomLayout
impl Clone for CustomLayout
Source§fn clone(&self) -> CustomLayout
fn clone(&self) -> CustomLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CustomLayout
impl Debug for CustomLayout
Source§impl From<CustomLayout> for TableLayout
impl From<CustomLayout> for TableLayout
Source§fn from(custom: CustomLayout) -> Self
fn from(custom: CustomLayout) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for CustomLayout
impl !UnwindSafe for CustomLayout
impl Freeze for CustomLayout
impl Send for CustomLayout
impl Sync for CustomLayout
impl Unpin for CustomLayout
impl UnsafeUnpin for CustomLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more