pub struct PartSecondsBuilder<'vf, T: ValueFormatTrait> { /* private fields */ }
Expand description

The number:seconds element specifies whether seconds are displayed as part of a date or time.

The number:seconds element is usable within the following elements:

  • number:datestyle 16.27.10 and
  • number:time-style 16.27.18.

The number:seconds element has the following attributes:

  • number:decimal-places 19.343.3 and
  • number:style 19.358.9.

The number:seconds element has no child elements.

Implementations§

source§

impl<'vf, T: ValueFormatTrait> PartSecondsBuilder<'vf, T>

source

pub fn new<'a>(valueformat: &'a mut T) -> Self
where 'a: 'vf,

New builder for the valueformat.

source

pub fn build(self)

Appends the constructed FormatPart to the original value format.

source

pub fn if_then<F>(self, test: bool, build: F) -> Self
where F: Fn(Self) -> Self,

Only applies the builder if the test is true.

source

pub fn decimal_places(self, decimal_places: u8) -> Self

If the number:decimal-places attribute is not specified, the number of decimal places specified by the default table cell style is used.

source

pub fn long_style(self) -> Self

The number:style attribute specifies whether the content of a time element is displayed in short or long format. The value of this attribute can be short or long. The meaning of these values depends on the value of the number:format-source 19.348 attribute that is attached to a date or time style.

source

pub fn short_style(self) -> Self

The number:style attribute specifies whether the content of a time element is displayed in short or long format. The value of this attribute can be short or long. The meaning of these values depends on the value of the number:format-source 19.348 attribute that is attached to a date or time style.

source

pub fn style(self, style: FormatNumberStyle) -> Self

The number:style attribute specifies whether the content of a time element is displayed in short or long format. The value of this attribute can be short or long. The meaning of these values depends on the value of the number:format-source 19.348 attribute that is attached to a date or time style.

Trait Implementations§

source§

impl<'vf, T: Debug + ValueFormatTrait> Debug for PartSecondsBuilder<'vf, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'vf, T> RefUnwindSafe for PartSecondsBuilder<'vf, T>
where T: RefUnwindSafe,

§

impl<'vf, T> Send for PartSecondsBuilder<'vf, T>
where T: Send,

§

impl<'vf, T> Sync for PartSecondsBuilder<'vf, T>
where T: Sync,

§

impl<'vf, T> Unpin for PartSecondsBuilder<'vf, T>

§

impl<'vf, T> !UnwindSafe for PartSecondsBuilder<'vf, T>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.