Struct andiskaz::style::Style[][src]

pub struct Style<C = Color2> where
    C: Updater
{ pub left_margin: Coord, pub right_margin: Coord, pub top_margin: Coord, pub bottom_margin: Coord, pub min_width: Coord, pub max_width: Coord, pub min_height: Coord, pub max_height: Coord, pub align_numer: Coord, pub align_denom: Coord, pub colors: C, }
Expand description

Alignment, margin and other settings for texts.

Fields

left_margin: Coord

Left margin.

right_margin: Coord

Right margin.

top_margin: Coord

Top margin.

bottom_margin: Coord

Bottom margin.

min_width: Coord

Minimum width.

max_width: Coord

Maximum width.

min_height: Coord

Minimum height.

max_height: Coord

Maximum height.

align_numer: Coord

Alignment align_numererator.

align_denom: Coord

Alignment align_denomominator.

colors: C

Foreground-background color pair.

Implementations

Creates a style with the given colors.

Updates the style to the given color updater.

Sets left margin.

Sets right margin.

Sets top margin.

Sets bottom margin.

Sets minimum width.

Sets maximum width.

Sets minimum height.

Sets maximum height.

Sets alignment. Numerator and align_denomominator are used such that line\[index\] * align_numer / align_denom == screen\[index\]

Makes a coordinate pair that contains the margin dimensions that are “less”.

Makes a coordinate pair that contains the margin dimensions that are “greater”.

Makes a coordinate pair that contains the minima sizes.

Makes a coordinate pair that contains the maxima sizes.

Makes a coordinate pair that contains the actual sizes.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.