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) -> Stylewhere
T: StyleApply,
pub fn apply<T>(self, prop: T) -> Stylewhere
T: StyleApply,
Sourcepub fn direction(self, direction: FlexDirection) -> Style
pub fn direction(self, direction: FlexDirection) -> Style
Sourcepub fn justify(self, justify: JustifyContent) -> Style
pub fn justify(self, justify: JustifyContent) -> Style
Sourcepub fn align(self, align: AlignItems) -> Style
pub fn align(self, align: AlignItems) -> Style
Sourcepub fn flex_shrink(self, shrink: f32) -> Style
pub fn flex_shrink(self, shrink: f32) -> Style
Sourcepub fn min_height(self, min_height: Length) -> Style
pub fn min_height(self, min_height: Length) -> Style
Sourcepub fn max_height(self, max_height: Length) -> Style
pub fn max_height(self, max_height: Length) -> Style
Sourcepub fn aspect_ratio(self, ratio: f32) -> Style
pub fn aspect_ratio(self, ratio: f32) -> Style
Sourcepub fn inset(
self,
top: Option<f32>,
right: Option<f32>,
bottom: Option<f32>,
left: Option<f32>,
) -> Style
pub fn inset( self, top: Option<f32>, right: Option<f32>, bottom: Option<f32>, left: Option<f32>, ) -> Style
Sourcepub fn background(self, color: Color) -> Style
pub fn background(self, color: Color) -> Style
Sourcepub fn gradient(self, gradient: LinearGradient) -> Style
pub fn gradient(self, gradient: LinearGradient) -> Style
Sourcepub fn focus_ring(self, ring: Border) -> Style
pub fn focus_ring(self, ring: Border) -> Style
Sourcepub fn cursor(self, cursor: CursorIcon) -> Style
pub fn cursor(self, cursor: CursorIcon) -> Style
Sourcepub fn pointer_events(self, pointer_events: PointerEvents) -> Style
pub fn pointer_events(self, pointer_events: PointerEvents) -> Style
Sourcepub fn font_weight(self, weight: FontWeight) -> Style
pub fn font_weight(self, weight: FontWeight) -> Style
Sourcepub fn font_family(self, family: FontFamily) -> Style
pub fn font_family(self, family: FontFamily) -> Style
Sourcepub fn text_align(self, align: TextAlign) -> Style
pub fn text_align(self, align: TextAlign) -> Style
Sourcepub fn text_overflow(self, overflow: TextOverflow) -> Style
pub fn text_overflow(self, overflow: TextOverflow) -> Style
Sourcepub fn stop_scroll_propagation(self, stop: bool) -> Style
pub fn stop_scroll_propagation(self, stop: bool) -> Style
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 Style
pub fn get_paint(&self) -> PaintStyle
pub fn get_mut_paint(&mut self) -> &mut PaintStyle
pub fn set_paint(&mut self, val: PaintStyle) -> &mut Style
pub fn get_text(&self) -> TextStyle
pub fn get_mut_text(&mut self) -> &mut TextStyle
pub fn set_text(&mut self, val: TextStyle) -> &mut Style
Source§impl Style
impl Style
pub fn new(layout: LayoutStyle, paint: PaintStyle, text: TextStyle) -> Style
Trait Implementations§
impl Copy for Style
impl StructuralPartialEq for Style
Source§impl StyleApply for Style
StyleApply implementation for Style allowing base-style merging inside newline-separated style! blocks.
impl StyleApply for Style
StyleApply implementation for Style allowing base-style merging inside newline-separated style! blocks.
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