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 append_content<S: AsRef<str>>(&mut self, content: S)
pub fn append_content<S: AsRef<str>>(&mut self, content: S)
Append to the textual content of this part.
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 duplicate 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 moreSource§impl Debug for FormatPart
impl Debug for FormatPart
Source§impl GetSize for FormatPart
impl GetSize for FormatPart
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)
fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
Determines how many bytes this object occupies inside the heap while using a
tracker
. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker
. Read moreAuto Trait Implementations§
impl Freeze for FormatPart
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