[−][src]Struct spreadsheet_ods::format::FormatPart
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]
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) -> 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 AttrMap for FormatPart[src]
fn attr_map(&self) -> &AttrMapType[src]
fn attr_map_mut(&mut self) -> &mut AttrMapType[src]
fn has_attr(&self) -> bool[src]
fn add_all(&mut self, data: Vec<(&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]
fn clone(&self) -> FormatPart[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for FormatPart[src]
Auto Trait Implementations
impl RefUnwindSafe for FormatPart
impl Send for FormatPart
impl Sync for FormatPart
impl Unpin for FormatPart
impl UnwindSafe for FormatPart
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,