pub struct Styles {
pub num_fmts: Vec<NumFmt>,
pub fonts: Vec<Font>,
pub fills: Vec<Fill>,
pub borders: Vec<Border>,
pub cell_style_xfs: Vec<CellStyleXfs>,
pub cell_xfs: Vec<CellXfs>,
pub cell_styles: Vec<CellStyles>,
pub dxfs: Vec<Dxf>,
}Fields§
§num_fmts: Vec<NumFmt>§fonts: Vec<Font>§fills: Vec<Fill>§borders: Vec<Border>§cell_style_xfs: Vec<CellStyleXfs>§cell_xfs: Vec<CellXfs>§cell_styles: Vec<CellStyles>§dxfs: Vec<Dxf>Implementations§
Source§impl Styles
impl Styles
pub fn create_new_style(&mut self, style: &Style) -> i32
pub fn get_style_index(&self, style: &Style) -> Option<i32>
pub fn get_style_index_by_name(&self, style_name: &str) -> Result<i32, String>
Sourcepub fn get_style_includes(
&self,
style_name: &str,
) -> Result<StyleIncludes, String>
pub fn get_style_includes( &self, style_name: &str, ) -> Result<StyleIncludes, String>
Returns which formatting categories the named style includes
(the apply* flags of its cellStyleXfs record).
Sourcepub fn create_named_style(
&mut self,
style_name: &str,
style: &Style,
includes: StyleIncludes,
) -> Result<(), String>
pub fn create_named_style( &mut self, style_name: &str, style: &Style, includes: StyleIncludes, ) -> Result<(), String>
Creates a named style. includes selects which formatting categories
the style carries (Excel’s “Style Includes” checkboxes); use
StyleIncludes::default() for a full style. style.quote_prefix is
ignored: a quote prefix belongs to a cell’s content, not to a named style.
Sourcepub fn get_named_style_list(&self) -> Vec<String>
pub fn get_named_style_list(&self) -> Vec<String>
Returns the names of all named styles
Sourcepub fn is_builtin_style(&self, style_name: &str) -> bool
pub fn is_builtin_style(&self, style_name: &str) -> bool
Returns true if the named style is built-in and cannot be deleted or modified. In OOXML, only “Normal” has builtinId=0; all other built-ins have builtinId > 0. Custom styles also have builtinId=0 (absent attribute), so we distinguish by name for the zero case.
Trait Implementations§
impl<'__de> Decode<'__de> for Styleswhere
'__de:,
impl Encode for Styles
impl StructuralPartialEq for Styles
Auto Trait Implementations§
impl Freeze for Styles
impl RefUnwindSafe for Styles
impl Send for Styles
impl Sync for Styles
impl Unpin for Styles
impl UnsafeUnpin for Styles
impl UnwindSafe for Styles
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