Struct pixel_widgets::style::builder::StyleBuilder[][src]

pub struct StyleBuilder { /* fields omitted */ }
Expand description

Builds a style.

Implementations

Add a rule defined in a RuleBuilder to the StyleBuilder.

Prepend the given selector to all rules in this StyleBuilder.

Merge with another StyleBuilder.

Include the scoped style of a Component in this StyleBuilder.

Asynchronously load a stylesheet from a .pwss file. See the style module documentation on how to write .pwss files.

Synchronously load a stylesheet from a .pwss file. See the style module documentation on how to write .pwss files.

Returns an ImageId for the key. When the style is built, the image is loaded using the closure.

Returns a PatchId for the key. When the style is built, the 9-patch is loaded using the closure.

Returns a FontId for the key. When the style is built, the font is loaded using the closure. The closure must return the bytes of a .ttf file.

Returns an ImageId for the key. When the style is built, the image is loaded by awaiting the future.

Returns a PatchId for the key. When the style is built, the 9-patch is loaded by awaiting the future.

Returns a FontId for the key. When the style is built, the font is loaded by awaiting the future. The future must output the bytes of a .ttf file.

Builds the Style. All loading of images, 9 patches and fonts happens in this method. If any of them fail, an error is returned.

Builds the Style. All loading of images, 9 patches and fonts happens in this method. If any of them fail, an error is returned.

Trait Implementations

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

The type returned in the event of a conversion error.

Performs the conversion.

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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. 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.