Struct spreadsheet_ods::format::FormatPart[][src]

pub struct FormatPart { /* fields omitted */ }

One structural part of a value format.

Implementations

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]

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]

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]

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]

pub fn new_week_of_year(calendar: FormatCalendarStyle) -> Self[src]

pub fn new_quarter(
    number: FormatNumberStyle,
    calendar: FormatCalendarStyle
) -> Self
[src]

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]

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 Clone for FormatPart[src]

impl Debug for FormatPart[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.