Struct spreadsheet_ods::format::PartFractionBuilder
source · pub struct PartFractionBuilder<'vf, T: ValueFormatTrait> { /* private fields */ }Expand description
The number:fraction element specifies the display formatting properties for a number style that should be displayed as a fraction.
The number:fraction element is usable within the following element:
- number:numberstyle 16.29.2.
The number:fraction element has the following attributes:
- number:denominatorvalue 19.345,
- number:grouping 19.350,
- number:max-denominator-value 19.352,
- number:min-denominator-digits 19.353,
- number:min-integer-digits 19.355 and
- number:min-numerator-digits 19.357.
The number:fraction element has no child elements.
Implementations§
source§impl<'vf, T: ValueFormatTrait> PartFractionBuilder<'vf, T>
impl<'vf, T: ValueFormatTrait> PartFractionBuilder<'vf, T>
sourcepub fn if_then<F>(self, test: bool, build: F) -> Selfwhere
F: Fn(Self) -> Self,
pub fn if_then<F>(self, test: bool, build: F) -> Selfwhere
F: Fn(Self) -> Self,
Only applies the builder if the test is true.
sourcepub fn denominator(self, v: i64) -> Self
pub fn denominator(self, v: i64) -> Self
The number:denominator-value attribute specifies an integer value that is used as the denominator of a fraction. If this attribute is not present, a denominator that is appropriate for displaying the number is used.
sourcepub fn grouping(self) -> Self
pub fn grouping(self) -> Self
The number:grouping attribute specifies whether the integer digits of a number should be grouped using a separator character. The grouping character that is used and the number of digits that are grouped together depends on the language and country of the style. The defined values for the number:grouping attribute are:
- false: integer digits of a number are not grouped using a separator character.
- true: integer digits of a number should be grouped by a separator character. The default value for this attribute is false.
sourcepub fn max_denominator(self, v: i64) -> Self
pub fn max_denominator(self, v: i64) -> Self
The number:max-denominator-value attribute specifies the maximum denominator permitted to be chosen if its number:fraction element does not have a number:denominator-value attribute. The number:max-denominator-value attribute is ignored in the presence of a number:denominator-value 19.345 attribute. The absence of the number:max-denominator-value attribute indicates that no maximum denominator is specified.
sourcepub fn min_denominator_digits(self, v: u8) -> Self
pub fn min_denominator_digits(self, v: u8) -> Self
The number:min-denominator-digits attribute specifies the minimum number of digits to use to display the denominator of a fraction.
sourcepub fn min_integer_digits(self, v: u8) -> Self
pub fn min_integer_digits(self, v: u8) -> Self
The number:min-integer-digits attribute specifies the minimum number of integer digits to display in the integer portion of a number, a scientific number, or a fraction. For a number:fraction element, if the number:min-integer-digits attribute is not present, no integer portion is displayed.
sourcepub fn min_numerator_digits(self, v: u8) -> Self
pub fn min_numerator_digits(self, v: u8) -> Self
The number:min-numerator-digits attribute specifies the minimum number of digits to use to display the numerator in a fraction.