Struct spreadsheet_ods::format::FormatPart
source · pub struct FormatPart { /* private fields */ }Expand description
One structural part of a value format.
Implementations§
source§impl FormatPart
impl FormatPart
sourcepub fn new(ftype: FormatPartType) -> Self
pub fn new(ftype: FormatPartType) -> Self
New, empty
sourcepub fn set_part_type(&mut self, p_type: FormatPartType)
pub fn set_part_type(&mut self, p_type: FormatPartType)
Sets the kind of the part.
sourcepub fn part_type(&self) -> FormatPartType
pub fn part_type(&self) -> FormatPartType
What kind of part?
sourcepub fn attr_def<'a, 'b, S>(&'a self, name: &'b str, default: S) -> &'a str
pub fn attr_def<'a, 'b, S>(&'a self, name: &'b str, default: S) -> &'a str
Returns a property or a default.
sourcepub fn set_position(&mut self, pos: i32)
pub fn set_position(&mut self, pos: i32)
Sets the position for embedded text in a number format part.
sourcepub fn clear_position(&mut self)
pub fn clear_position(&mut self)
Clear the position for embedded text in a number format part.
sourcepub fn set_content<S: Into<String>>(&mut self, content: S)
pub fn set_content<S: Into<String>>(&mut self, content: S)
Sets a textual content for this part. This is only used for text and currency-symbol.
sourcepub fn clear_content(&mut self)
pub fn clear_content(&mut self)
Clear the textual content for this part. This is only used for text and currency-symbol.
Trait Implementations§
source§impl Clone for FormatPart
impl Clone for FormatPart
source§fn clone(&self) -> FormatPart
fn clone(&self) -> FormatPart
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for FormatPart
impl Send for FormatPart
impl Sync for FormatPart
impl Unpin for FormatPart
impl UnwindSafe for FormatPart
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