Struct umya_spreadsheet::structs::Style
source · [−]pub struct Style { /* private fields */ }
Implementations
sourceimpl Style
impl Style
Examples
add border
use umya_spreadsheet::*;
let mut book = new_file();
let mut style = book.get_sheet_by_name_mut("Sheet1").unwrap().get_style_mut("D2");
// add bottom border
style.get_borders_mut().get_bottom_mut().set_border_style(Border::BORDER_MEDIUM);
// add top border
style.get_borders_mut().get_top_mut().set_border_style(Border::BORDER_MEDIUM);
// add left border
style.get_borders_mut().get_left_mut().set_border_style(Border::BORDER_MEDIUM);
// add right border
style.get_borders_mut().get_right_mut().set_border_style(Border::BORDER_MEDIUM);
change cell color
use umya_spreadsheet::*;
let mut book = new_file();
let mut style = book.get_sheet_by_name_mut("Sheet1").unwrap().get_style_mut("A1");
// fill color on red.
style.get_fill_mut().get_pattern_fill_mut()
.get_foreground_color_mut().set_argb(Color::COLOR_RED);
change font color
use umya_spreadsheet::*;
let mut book = new_file();
let mut style = book.get_sheet_by_name_mut("Sheet1").unwrap().get_style_mut("A1");
// font color on red.
style.get_font_mut().get_color_mut().set_argb(Color::COLOR_RED);
pub fn get_font(&self) -> &Option<Font>
pub fn get_font_mut(&mut self) -> &mut Font
pub fn set_font(&mut self, value: Font) -> &mut Self
pub fn remove_font(&mut self) -> &mut Self
pub fn get_fill(&self) -> &Option<Fill>
pub fn get_fill_mut(&mut self) -> &mut Fill
pub fn set_fill(&mut self, value: Fill) -> &mut Self
pub fn remove_fill(&mut self) -> &mut Self
pub fn get_borders(&self) -> &Option<Borders>
pub fn get_borders_mut(&mut self) -> &mut Borders
pub fn set_borders(&mut self, value: Borders) -> &mut Self
pub fn remove_borders(&mut self) -> &mut Self
pub fn get_alignment(&self) -> &Option<Alignment>
pub fn get_alignment_mut(&mut self) -> &mut Alignment
pub fn set_alignment(&mut self, value: Alignment) -> &mut Self
pub fn remove_alignment(&mut self) -> &mut Self
pub fn get_numbering_format(&self) -> &Option<NumberingFormat>
pub fn get_numbering_format_mut(&mut self) -> &mut NumberingFormat
pub fn set_numbering_format(&mut self, value: NumberingFormat) -> &mut Self
pub fn remove_numbering_format(&mut self) -> &mut Self
pub fn get_number_format(&self) -> &Option<NumberingFormat>
pub fn get_number_format_mut(&mut self) -> &mut NumberingFormat
pub fn set_number_format(&mut self, value: NumberingFormat) -> &mut Self
pub fn remove_number_format(&mut self) -> &mut Self
pub fn get_format_id(&self) -> &u32
pub fn set_format_id(&mut self, value: u32) -> &mut Self
Trait Implementations
sourceimpl PartialOrd<Style> for Style
impl PartialOrd<Style> for Style
sourcefn partial_cmp(&self, other: &Style) -> Option<Ordering>
fn partial_cmp(&self, other: &Style) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl StructuralPartialEq for Style
Auto Trait Implementations
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more