pub struct FormattingOptions { /* private fields */ }formatting_options)wayland and Linux only.Expand description
Implementationsยง
Sourceยงimpl FormattingOptions
impl FormattingOptions
Sourcepub const fn new() -> FormattingOptions
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub const fn new() -> FormattingOptions
formatting_options)Construct a new FormatterBuilder with the supplied Write trait
object for output that is equivalent to the {} formatting
specifier:
- no flags,
- filled with spaces,
- no alignment,
- no width,
- no precision, and
- no
DebugAsHexoutput mode.
Sourcepub fn sign(&mut self, sign: Option<Sign>) -> &mut FormattingOptions
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub fn sign(&mut self, sign: Option<Sign>) -> &mut FormattingOptions
formatting_options)Sets or removes the sign (the + or the - flag).
+: This is intended for numeric types and indicates that the sign should always be printed. By default only the negative sign of signed values is printed, and the sign of positive or unsigned values is omitted. This flag indicates that the correct sign (+ or -) should always be printed.-: Currently not used
Sourcepub fn sign_aware_zero_pad(
&mut self,
sign_aware_zero_pad: bool,
) -> &mut FormattingOptions
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub fn sign_aware_zero_pad( &mut self, sign_aware_zero_pad: bool, ) -> &mut FormattingOptions
formatting_options)Sets or unsets the 0 flag.
This is used to indicate for integer formats that the padding to width should both be done with a 0 character as well as be sign-aware
Sourcepub fn alternate(&mut self, alternate: bool) -> &mut FormattingOptions
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub fn alternate(&mut self, alternate: bool) -> &mut FormattingOptions
formatting_options)Sets or unsets the # flag.
This flag indicates that the โalternateโ form of printing should be used. The alternate forms are:
Sourcepub fn fill(&mut self, fill: char) -> &mut FormattingOptions
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub fn fill(&mut self, fill: char) -> &mut FormattingOptions
formatting_options)Sets the fill character.
The optional fill character and alignment is provided normally in conjunction with the width parameter. This indicates that if the value being formatted is smaller than width some extra characters will be printed around it.
Sourcepub fn align(&mut self, align: Option<Alignment>) -> &mut FormattingOptions
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub fn align(&mut self, align: Option<Alignment>) -> &mut FormattingOptions
formatting_options)Sets or removes the alignment.
The alignment specifies how the value being formatted should be positioned if it is smaller than the width of the formatter.
Sourcepub fn width(&mut self, width: Option<u16>) -> &mut FormattingOptions
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub fn width(&mut self, width: Option<u16>) -> &mut FormattingOptions
formatting_options)Sets or removes the width.
This is a parameter for the โminimum widthโ that the format should take
up. If the valueโs string does not fill up this many characters, then
the padding specified by FormattingOptions::fill/FormattingOptions::align
will be used to take up the required space.
Sourcepub fn precision(&mut self, precision: Option<u16>) -> &mut FormattingOptions
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub fn precision(&mut self, precision: Option<u16>) -> &mut FormattingOptions
formatting_options)Sets or removes the precision.
- For non-numeric types, this can be considered a โmaximum widthโ. If the resulting string is longer than this width, then it is truncated down to this many characters and that truncated value is emitted with proper fill, alignment and width if those parameters are set.
- For integral types, this is ignored.
- For floating-point types, this indicates how many digits after the decimal point should be printed.
Sourcepub fn debug_as_hex(
&mut self,
debug_as_hex: Option<DebugAsHex>,
) -> &mut FormattingOptions
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub fn debug_as_hex( &mut self, debug_as_hex: Option<DebugAsHex>, ) -> &mut FormattingOptions
formatting_options)Specifies whether the Debug trait should use lower-/upper-case
hexadecimal or normal integers
Sourcepub const fn get_sign(&self) -> Option<Sign>
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub const fn get_sign(&self) -> Option<Sign>
formatting_options)Returns the current sign (the + or the - flag).
Sourcepub const fn get_sign_aware_zero_pad(&self) -> bool
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub const fn get_sign_aware_zero_pad(&self) -> bool
formatting_options)Returns the current 0 flag.
Sourcepub const fn get_alternate(&self) -> bool
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub const fn get_alternate(&self) -> bool
formatting_options)Returns the current # flag.
Sourcepub const fn get_fill(&self) -> char
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub const fn get_fill(&self) -> char
formatting_options)Returns the current fill character.
Sourcepub const fn get_align(&self) -> Option<Alignment>
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub const fn get_align(&self) -> Option<Alignment>
formatting_options)Returns the current alignment.
Sourcepub const fn get_width(&self) -> Option<u16>
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub const fn get_width(&self) -> Option<u16>
formatting_options)Returns the current width.
Sourcepub const fn get_precision(&self) -> Option<u16>
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub const fn get_precision(&self) -> Option<u16>
formatting_options)Returns the current precision.
Sourcepub const fn get_debug_as_hex(&self) -> Option<DebugAsHex>
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub const fn get_debug_as_hex(&self) -> Option<DebugAsHex>
formatting_options)Returns the current precision.
Sourcepub fn create_formatter<'a>(self, write: &'a mut dyn Write) -> Formatter<'a>
๐ฌThis is a nightly-only experimental API. (formatting_options)
pub fn create_formatter<'a>(self, write: &'a mut dyn Write) -> Formatter<'a>
formatting_options)Creates a Formatter that writes its output to the given Write trait.
You may alternatively use Formatter::new().
Trait Implementationsยง
Sourceยงimpl Clone for FormattingOptions
impl Clone for FormattingOptions
Sourceยงfn clone(&self) -> FormattingOptions
fn clone(&self) -> FormattingOptions
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSourceยงimpl Debug for FormattingOptions
impl Debug for FormattingOptions
Sourceยงimpl Default for FormattingOptions
impl Default for FormattingOptions
Sourceยงfn default() -> FormattingOptions
fn default() -> FormattingOptions
Same as FormattingOptions::new().
Sourceยงimpl PartialEq for FormattingOptions
impl PartialEq for FormattingOptions
impl Copy for FormattingOptions
impl Eq for FormattingOptions
impl StructuralPartialEq for FormattingOptions
Auto Trait Implementationsยง
impl Freeze for FormattingOptions
impl RefUnwindSafe for FormattingOptions
impl Send for FormattingOptions
impl Sync for FormattingOptions
impl Unpin for FormattingOptions
impl UnwindSafe for FormattingOptions
Blanket Implementationsยง
Sourceยงimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Sourceยงfn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Sourceยงfn adapt_into(self) -> D
fn adapt_into(self) -> D
ยงimpl<T> AnyEq for T
impl<T> AnyEq for T
ยงimpl<T, Res> Apply<Res> for Twhere
T: ?Sized,
impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
Sourceยงimpl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Sourceยงfn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Sourceยงimpl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Sourceยงfn arrays_into(self) -> C
fn arrays_into(self) -> C
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Sourceยงimpl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Sourceยงtype Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Sourceยงfn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Sourceยงfn components_from(colors: C) -> T
fn components_from(colors: C) -> T
ยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
ยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Anyโs vtable from &Traitโs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Anyโs vtable from &mut Traitโs.ยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Sourceยงimpl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Sourceยงfn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Sourceยงimpl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Sourceยงfn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.ยงimpl<T> Instrument for T
impl<T> Instrument for T
ยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> Instrumented<Self> โ
Sourceยงimpl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Sourceยงfn into_angle(self) -> U
fn into_angle(self) -> U
T.ยงimpl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
ยงfn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.Sourceยงimpl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Sourceยงtype Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Sourceยงfn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Sourceยงimpl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Sourceยงfn into_color(self) -> U
fn into_color(self) -> U
Sourceยงimpl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Sourceยงfn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Sourceยงimpl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Sourceยงfn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.ยงimpl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
ยงfn null_value() -> T
fn null_value() -> T
Sourceยงimpl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Sourceยงtype Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Sourceยงfn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Sourceยงimpl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Sourceยงfn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more