pub struct Style { /* private fields */ }Expand description
Complete compiled style value combining layout, paint, and typography with zero heap allocations.
Implementations§
Source§impl Style
Fluent zero-allocation builder methods for Style.
impl Style
Fluent zero-allocation builder methods for Style.
Sourcepub fn apply<T>(self, prop: T) -> Selfwhere
T: StyleApply,
pub fn apply<T>(self, prop: T) -> Selfwhere
T: StyleApply,
Sourcepub fn direction(self, direction: FlexDirection) -> Self
pub fn direction(self, direction: FlexDirection) -> Self
Sourcepub fn justify(self, justify: JustifyContent) -> Self
pub fn justify(self, justify: JustifyContent) -> Self
Sourcepub fn align(self, align: AlignItems) -> Self
pub fn align(self, align: AlignItems) -> Self
Sourcepub fn flex_shrink(self, shrink: f32) -> Self
pub fn flex_shrink(self, shrink: f32) -> Self
Sourcepub fn min_height(self, min_height: Length) -> Self
pub fn min_height(self, min_height: Length) -> Self
Sourcepub fn max_height(self, max_height: Length) -> Self
pub fn max_height(self, max_height: Length) -> Self
Sourcepub fn aspect_ratio(self, ratio: f32) -> Self
pub fn aspect_ratio(self, ratio: f32) -> Self
Sourcepub fn inset(
self,
top: Option<f32>,
right: Option<f32>,
bottom: Option<f32>,
left: Option<f32>,
) -> Self
pub fn inset( self, top: Option<f32>, right: Option<f32>, bottom: Option<f32>, left: Option<f32>, ) -> Self
Sourcepub fn background(self, color: Color) -> Self
pub fn background(self, color: Color) -> Self
Sourcepub fn gradient(self, gradient: LinearGradient) -> Self
pub fn gradient(self, gradient: LinearGradient) -> Self
Sourcepub fn focus_ring(self, ring: Border) -> Self
pub fn focus_ring(self, ring: Border) -> Self
Sourcepub fn cursor(self, cursor: CursorIcon) -> Self
pub fn cursor(self, cursor: CursorIcon) -> Self
Sourcepub fn pointer_events(self, pointer_events: PointerEvents) -> Self
pub fn pointer_events(self, pointer_events: PointerEvents) -> Self
Sourcepub fn font_weight(self, weight: FontWeight) -> Self
pub fn font_weight(self, weight: FontWeight) -> Self
Sourcepub fn font_family(self, family: FontFamily) -> Self
pub fn font_family(self, family: FontFamily) -> Self
Sourcepub fn text_align(self, align: TextAlign) -> Self
pub fn text_align(self, align: TextAlign) -> Self
Sourcepub fn text_overflow(self, overflow: TextOverflow) -> Self
pub fn text_overflow(self, overflow: TextOverflow) -> Self
Sourcepub fn stop_scroll_propagation(self, stop: bool) -> Self
pub fn stop_scroll_propagation(self, stop: bool) -> Self
Sourcepub fn stop_event_propagation(self, stop: bool) -> Self
pub fn stop_event_propagation(self, stop: bool) -> Self
Source§impl Style
impl Style
pub fn get_layout(&self) -> LayoutStyle
pub fn get_mut_layout(&mut self) -> &mut LayoutStyle
pub fn set_layout(&mut self, val: LayoutStyle) -> &mut Self
pub fn get_paint(&self) -> PaintStyle
pub fn get_mut_paint(&mut self) -> &mut PaintStyle
pub fn set_paint(&mut self, val: PaintStyle) -> &mut Self
pub fn get_text(&self) -> TextStyle
pub fn get_mut_text(&mut self) -> &mut TextStyle
pub fn set_text(&mut self, val: TextStyle) -> &mut Self
Source§impl Style
impl Style
pub fn new(layout: LayoutStyle, paint: PaintStyle, text: TextStyle) -> Self
Trait Implementations§
impl Copy for Style
impl StructuralPartialEq for Style
Source§impl StyleApply for Style
StyleApply implementation for Style allowing base-style merging inside style! { base_style; ... }.
impl StyleApply for Style
StyleApply implementation for Style allowing base-style merging inside style! { base_style; ... }.
Auto Trait Implementations§
impl Forget for Style
impl Freeze for Style
impl Move for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
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