pub struct StringBarBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> StringBarBuilder<S>
impl<S: State> StringBarBuilder<S>
Sourcepub fn build(self) -> StringBarwhere
S: IsComplete,
pub fn build(self) -> StringBarwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn value(self, value: u64) -> StringBarBuilder<SetValue<S>>where
S::Value: IsUnset,
pub fn value(self, value: u64) -> StringBarBuilder<SetValue<S>>where
S::Value: IsUnset,
Required.
Sourcepub fn max(self, value: u64) -> StringBarBuilder<SetMax<S>>where
S::Max: IsUnset,
pub fn max(self, value: u64) -> StringBarBuilder<SetMax<S>>where
S::Max: IsUnset,
Required.
StringBar::value is allowed to be larger than StringBar::max.
Sourcepub fn width(self, value: u16) -> StringBarBuilder<SetWidth<S>>where
S::Width: IsUnset,
pub fn width(self, value: u16) -> StringBarBuilder<SetWidth<S>>where
S::Width: IsUnset,
Optional (Some / Option setters).
Default: 15.
In 1/8-block units.
-
File Explorer: This is equivalent to device-independent pixels (in default scale). If too wide, the column will be truncated from right to left, even it’s right-aligned.
The thinnest column by default, Size column, defaults to 100dip width, but only ~84dip is used to display text. For monospaced mode, the max width won’t cause trurncation is ~16 with a
HAIR_SPACE, and ~15 with a space. For proportional mode, it’s ~25.
Sourcepub fn maybe_width(self, value: Option<u16>) -> StringBarBuilder<SetWidth<S>>where
S::Width: IsUnset,
pub fn maybe_width(self, value: Option<u16>) -> StringBarBuilder<SetWidth<S>>where
S::Width: IsUnset,
Optional (Some / Option setters).
Default: 15.
In 1/8-block units.
-
File Explorer: This is equivalent to device-independent pixels (in default scale). If too wide, the column will be truncated from right to left, even it’s right-aligned.
The thinnest column by default, Size column, defaults to 100dip width, but only ~84dip is used to display text. For monospaced mode, the max width won’t cause trurncation is ~16 with a
HAIR_SPACE, and ~15 with a space. For proportional mode, it’s ~25.