Struct spreadsheet_ods::format::FormatPart [−][src]
pub struct FormatPart { /* fields omitted */ }
One structural part of a value format.
Implementations
impl FormatPart
[src]
impl FormatPart
[src]pub fn new(ftype: FormatPartType) -> Self
[src]
New, empty
pub fn new_with_content<S: Into<String>>(
ftype: FormatPartType,
content: S
) -> Self
[src]
ftype: FormatPartType,
content: S
) -> Self
New, with string content.
pub fn new_boolean() -> Self
[src]
Boolean Part
pub fn new_number(decimal: u8, grouping: bool) -> Self
[src]
Number format part.
pub fn new_number_fix(decimal: u8, grouping: bool) -> Self
[src]
Number format part with fixed decimal places.
pub fn new_fraction(
denominator: u32,
min_den_digits: u8,
min_int_digits: u8,
min_num_digits: u8,
grouping: bool
) -> Self
[src]
denominator: u32,
min_den_digits: u8,
min_int_digits: u8,
min_num_digits: u8,
grouping: bool
) -> Self
Format as a fraction.
pub fn new_scientific(dec_places: u8) -> Self
[src]
Format with scientific notation.
pub fn new_currency<S1, S2, S3>(country: S1, language: S2, symbol: S3) -> Self where
S1: Into<String>,
S2: Into<String>,
S3: Into<String>,
[src]
S1: Into<String>,
S2: Into<String>,
S3: Into<String>,
Currency symbol.
pub fn new_day(number: FormatNumberStyle) -> Self
[src]
pub fn new_month(number: FormatNumberStyle, text: bool) -> Self
[src]
pub fn new_year(number: FormatNumberStyle) -> Self
[src]
pub fn new_era(number: FormatNumberStyle, calendar: FormatCalendarStyle) -> Self
[src]
pub fn new_day_of_week(
number: FormatNumberStyle,
calendar: FormatCalendarStyle
) -> Self
[src]
number: FormatNumberStyle,
calendar: FormatCalendarStyle
) -> Self
pub fn new_week_of_year(calendar: FormatCalendarStyle) -> Self
[src]
pub fn new_quarter(
number: FormatNumberStyle,
calendar: FormatCalendarStyle
) -> Self
[src]
number: FormatNumberStyle,
calendar: FormatCalendarStyle
) -> Self
pub fn new_hours(number: FormatNumberStyle) -> Self
[src]
pub fn new_minutes(number: FormatNumberStyle) -> Self
[src]
pub fn new_seconds(number: FormatNumberStyle) -> Self
[src]
pub fn new_am_pm() -> Self
[src]
pub fn new_embedded_text(position: u8) -> Self
[src]
Whatever this is for …
pub fn new_text<S: Into<String>>(text: S) -> Self
[src]
Part with fixed text.
pub fn new_text_content() -> Self
[src]
Whatever this is for …
pub fn set_part_type(&mut self, p_type: FormatPartType)
[src]
Sets the kind of the part.
pub fn part_type(&self) -> FormatPartType
[src]
What kind of part?
pub fn attr_def<'a0, 'a1, S0, S1>(&'a1 self, name: S0, default: S1) -> &'a1 str where
S0: Into<&'a0 str>,
S1: Into<&'a1 str>,
[src]
S0: Into<&'a0 str>,
S1: Into<&'a1 str>,
Returns a property or a default.
pub fn set_content<S: Into<String>>(&mut self, content: S)
[src]
Sets a textual content for this part. This is only used for text and currency-symbol.
pub fn content(&self) -> Option<&String>
[src]
Returns the text content.
Trait Implementations
impl AttrMap2Trait for FormatPart
[src]
impl AttrMap2Trait for FormatPart
[src]fn attrmap(&self) -> &AttrMap2
[src]
fn attrmap_mut(&mut self) -> &mut AttrMap2
[src]
fn is_empty(&self) -> bool
[src]
fn add_all(&mut self, data: &[(&str, String)])
[src]
fn set_attr(&mut self, name: &str, value: String)
[src]
fn clear_attr(&mut self, name: &str) -> Option<String>
[src]
fn attr(&self, name: &str) -> Option<&String>
[src]
impl Clone for FormatPart
[src]
impl Clone for FormatPart
[src]fn clone(&self) -> FormatPart
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for FormatPart
impl RefUnwindSafe for FormatPart
impl Send for FormatPart
impl Send for FormatPart
impl Sync for FormatPart
impl Sync for FormatPart
impl Unpin for FormatPart
impl Unpin for FormatPart
impl UnwindSafe for FormatPart
impl UnwindSafe for FormatPart