pub struct CellFactory<'a> { /* private fields */ }
Expand description
Cell Factory - Utility to make it easier to construct a Cell
object,
which is useful when adding or updating Row
s in a Sheet
.
Implementations§
Source§impl<'a> CellFactory<'a>
impl<'a> CellFactory<'a>
Sourcepub fn new(cols: &'a ColumnMapper<'_>) -> Self
pub fn new(cols: &'a ColumnMapper<'_>) -> Self
Create a new CellFactory
from a reference to a ColumnMapper
object
pub fn cell<V: Into<CellValue>>( &'a self, column_name: &'a str, value: V, ) -> Result<Cell, Box<dyn Error + Send + Sync>>
pub fn cell_with_id<V: Into<CellValue>>( &'a self, column_id: u64, value: V, ) -> Cell
pub fn url_hyperlink_cell( &'a self, column_name: &'a str, display_text: &'a str, url: &'a str, ) -> Result<Cell, Box<dyn Error + Send + Sync>>
pub fn url_hyperlink_cell_with_id( &'a self, column_id: u64, display_text: &'a str, url: &'a str, ) -> Cell
pub fn multi_picklist_cell( &'a self, column_name: &'a str, values: &[&'a str], ) -> Result<Cell, Box<dyn Error + Send + Sync>>
pub fn multi_picklist_cell_with_id( &'a self, column_id: u64, values: &[&'a str], ) -> Cell
pub fn contact_cell( &'a self, column_name: &'a str, contact: impl Into<Contact<'a>>, ) -> Result<Cell, Box<dyn Error + Send + Sync>>
pub fn contact_cell_with_id( &'a self, column_id: u64, contact: impl Into<Contact<'a>>, ) -> Cell
pub fn multi_contact_cell( &'a self, column_name: &'a str, contacts: &[Contact<'a>], ) -> Result<Cell, Box<dyn Error + Send + Sync>>
pub fn multi_contact_cell_with_id( &'a self, column_id: u64, contacts: &[Contact<'a>], ) -> Cell
Auto Trait Implementations§
impl<'a> Freeze for CellFactory<'a>
impl<'a> RefUnwindSafe for CellFactory<'a>
impl<'a> Send for CellFactory<'a>
impl<'a> Sync for CellFactory<'a>
impl<'a> Unpin for CellFactory<'a>
impl<'a> UnwindSafe for CellFactory<'a>
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