pub struct StyleBuilder<T> { /* private fields */ }
Expand description
A style builder.
See the Style
trait for an example.
Implementations§
Source§impl<T: Any> StyleBuilder<T>
impl<T: Any> StyleBuilder<T>
Sourcepub fn new<U, B>(builder: B) -> Selfwhere
B: IntoStyleBuilder<U, Output = T> + 'static,
pub fn new<U, B>(builder: B) -> Selfwhere
B: IntoStyleBuilder<U, Output = T> + 'static,
Create a new style builder.
This takes a function that takes any number of references to Style
s and returns a style.
Each Style
referenced will be created if not already present in the Styles
collection.
If a style is dependent on this style, it will be rebuilt when this style is rebuilt.
Note: Cyclic dependencies are not allowed and will result in a panic.
Trait Implementations§
Source§impl<T> Debug for StyleBuilder<T>
impl<T> Debug for StyleBuilder<T>
Source§impl<T> IntoStyleBuilder<StyleBuilder<T>> for StyleBuilder<T>
impl<T> IntoStyleBuilder<StyleBuilder<T>> for StyleBuilder<T>
Auto Trait Implementations§
impl<T> Freeze for StyleBuilder<T>
impl<T> !RefUnwindSafe for StyleBuilder<T>
impl<T> !Send for StyleBuilder<T>
impl<T> !Sync for StyleBuilder<T>
impl<T> Unpin for StyleBuilder<T>
impl<T> !UnwindSafe for StyleBuilder<T>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more