[][src]Struct spreadsheet_ods::format::ValueFormat

pub struct ValueFormat { /* fields omitted */ }

Actual textual formatting of values.

Implementations

impl ValueFormat[src]

pub fn new() -> Self[src]

New, empty.

pub fn new_with_name<S: Into<String>>(name: S, value_type: ValueType) -> Self[src]

New, with name.

pub fn set_name<S: Into<String>>(&mut self, name: S)[src]

Sets the name.

pub fn name(&self) -> &String[src]

Returns the name.

pub fn set_country<S: Into<String>>(&mut self, country: S)[src]

Sets the country.

pub fn country(&self) -> Option<&String>[src]

Country

pub fn set_language<S: Into<String>>(&mut self, language: S)[src]

Sets the language.

pub fn language(&self) -> Option<&String>[src]

Language

pub fn set_script<S: Into<String>>(&mut self, script: S)[src]

Sets the Script.

pub fn script(&self) -> Option<&String>[src]

Script

pub fn set_value_type(&mut self, value_type: ValueType)[src]

Sets the value type.

pub fn value_type(&self) -> ValueType[src]

Returns the value type.

pub fn set_origin(&mut self, origin: StyleOrigin)[src]

Sets the origin.

pub fn origin(&self) -> StyleOrigin[src]

Returns the origin.

pub fn set_styleuse(&mut self, styleuse: StyleUse)[src]

Style usage.

pub fn styleuse(&self) -> StyleUse[src]

Returns the usage.

pub fn text(&self) -> &TextAttr[src]

Text style attributes.

pub fn text_mut(&mut self) -> &mut TextAttr[src]

Text style attributes.

pub fn push_boolean(&mut self)[src]

Appends a format part.

pub fn push_number(&mut self, decimal: u8, grouping: bool)[src]

Appends a format part.

pub fn push_number_fix(&mut self, decimal: u8, grouping: bool)[src]

Appends a format part.

pub fn push_fraction(
    &mut self,
    denominator: u32,
    min_den_digits: u8,
    min_int_digits: u8,
    min_num_digits: u8,
    grouping: bool
)
[src]

Appends a format part.

pub fn push_scientific(&mut self, dec_places: u8)[src]

Appends a format part.

pub fn push_currency<S1, S2, S3>(
    &mut self,
    country: S1,
    language: S2,
    symbol: S3
) where
    S1: Into<String>,
    S2: Into<String>,
    S3: Into<String>, 
[src]

Appends a format part.

pub fn push_day(&mut self, number: FormatNumberStyle)[src]

Appends a format part.

pub fn push_month(&mut self, number: FormatNumberStyle)[src]

Appends a format part.

pub fn push_year(&mut self, number: FormatNumberStyle)[src]

Appends a format part.

pub fn push_era(
    &mut self,
    number: FormatNumberStyle,
    calendar: FormatCalendarStyle
)
[src]

Appends a format part.

pub fn push_day_of_week(
    &mut self,
    number: FormatNumberStyle,
    calendar: FormatCalendarStyle
)
[src]

Appends a format part.

pub fn push_week_of_year(&mut self, calendar: FormatCalendarStyle)[src]

Appends a format part.

pub fn push_quarter(
    &mut self,
    number: FormatNumberStyle,
    calendar: FormatCalendarStyle
)
[src]

Appends a format part.

pub fn push_hours(&mut self, number: FormatNumberStyle)[src]

Appends a format part.

pub fn push_minutes(&mut self, number: FormatNumberStyle)[src]

Appends a format part.

pub fn push_seconds(&mut self, number: FormatNumberStyle)[src]

Appends a format part.

pub fn push_am_pm(&mut self)[src]

Appends a format part.

pub fn push_embedded_text(&mut self, position: u8)[src]

Appends a format part.

pub fn push_text<S: Into<String>>(&mut self, text: S)[src]

Appends a format part.

pub fn push_text_content(&mut self)[src]

Appends a format part.

pub fn push_part(&mut self, part: FormatPart)[src]

Adds a format part.

pub fn push_parts(&mut self, partvec: &mut Vec<FormatPart>)[src]

Adds all format parts.

pub fn parts(&self) -> &Vec<FormatPart>[src]

Returns the parts.

pub fn parts_mut(&mut self) -> &mut Vec<FormatPart>[src]

Returns the mutable parts.

pub fn push_stylemap(&mut self, stylemap: StyleMap)[src]

Adds a stylemap.

pub fn stylemaps(&self) -> Option<&Vec<StyleMap>>[src]

Returns the stylemaps

pub fn stylemaps_mut(&mut self) -> &mut Vec<StyleMap>[src]

Returns the mutable stylemap.

pub fn format_boolean(&self, b: bool) -> String[src]

Tries to format. If there are no matching parts, does nothing.

pub fn format_float(&self, f: f64) -> String[src]

Tries to format. If there are no matching parts, does nothing.

pub fn format_str<'a, S: Into<&'a str>>(&self, s: S) -> String[src]

Tries to format. If there are no matching parts, does nothing.

pub fn format_datetime(&self, d: &NaiveDateTime) -> String[src]

Tries to format. If there are no matching parts, does nothing. Should work reasonably. Don't ask me about other calenders.

pub fn format_time_duration(&self, d: &Duration) -> String[src]

Tries to format. Should work reasonably. If there are no matching parts, does nothing.

Trait Implementations

impl AttrMap for ValueFormat[src]

impl Clone for ValueFormat[src]

impl Debug for ValueFormat[src]

impl Default for ValueFormat[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.