pub struct Flex { /* private fields */ }Implementations§
Source§impl Flex
impl Flex
pub fn new() -> Self
pub fn row(self) -> Self
pub fn column(self) -> Self
pub fn wrap(self) -> Self
pub fn gap_px(self, gap: f32) -> Self
pub fn gap_sm(self) -> Self
pub fn gap_md(self) -> Self
pub fn gap_lg(self) -> Self
pub fn gap_xl(self) -> Self
pub fn padding_px(self, padding: f32) -> Self
pub fn padding_sm(self) -> Self
pub fn padding_md(self) -> Self
pub fn padding_lg(self) -> Self
pub fn padding_x_px(self, padding: f32) -> Self
pub fn padding_x_units(self, padding: f32) -> Self
pub fn padding_y_px(self, padding: f32) -> Self
pub fn margin_y_px(self, margin: f32) -> Self
pub fn margin_y_units(self, margin: f32) -> Self
pub fn height_px(self, height: f32) -> Self
pub fn height_units(self, height: f32) -> Self
pub fn width_px(self, width: f32) -> Self
pub fn width_percent(self, percent: f32) -> Self
pub fn h_full(self) -> Self
pub fn w_full(self) -> Self
pub fn size_full(self) -> Self
pub fn flex_1(self) -> Self
pub fn flex_none(self) -> Self
pub fn min_h_0(self) -> Self
pub fn bg(self, color: Hsla) -> Self
pub fn text_color(self, color: Hsla) -> Self
pub fn text_size_px(self, size: f32) -> Self
pub fn text_xs(self) -> Self
pub fn text_sm(self) -> Self
pub fn bold(self) -> Self
pub fn border(self) -> Self
pub fn border_color(self, color: Hsla) -> Self
pub fn rounded_px(self, radius: f32) -> Self
pub fn rounded_units(self, radius: f32) -> Self
pub fn rounded_md(self) -> Self
pub fn rounded_pill(self) -> Self
pub fn relative(self) -> Self
pub fn overflow_y_scroll(self) -> Self
pub fn id(self, id: impl Into<ElementId>) -> Self
pub fn track_scroll(self, handle: &ScrollHandle) -> Self
pub fn align_start(self) -> Self
pub fn align_center(self) -> Self
pub fn align_end(self) -> Self
pub fn justify_start(self) -> Self
pub fn justify_center(self) -> Self
pub fn justify_end(self) -> Self
pub fn justify_between(self) -> Self
pub fn center(self) -> Self
pub fn child(self, child: impl IntoElement) -> Self
pub fn children( self, children: impl IntoIterator<Item = impl IntoElement>, ) -> Self
Trait Implementations§
Source§impl IntoElement for Flex
impl IntoElement for Flex
Source§type Element = Component<Flex>
type Element = Component<Flex>
The specific type of element into which the implementing type is converted.
Useful for converting other types into elements automatically, like Strings
Source§fn into_element(self) -> Self::Element
fn into_element(self) -> Self::Element
Convert self into a type that implements
Element.Source§fn into_any_element(self) -> AnyElement
fn into_any_element(self) -> AnyElement
Convert self into a dynamically-typed
AnyElement.Source§impl RenderOnce for Flex
impl RenderOnce for Flex
Source§fn render(self, _window: &mut Window, _cx: &mut App) -> impl IntoElement
fn render(self, _window: &mut Window, _cx: &mut App) -> impl IntoElement
Render this component into an element tree. Note that this method
takes ownership of self, as compared to
Render::render() method
which takes a mutable reference.Auto Trait Implementations§
impl !RefUnwindSafe for Flex
impl !Send for Flex
impl !Sync for Flex
impl !UnwindSafe for Flex
impl Freeze for Flex
impl Unpin for Flex
impl UnsafeUnpin for Flex
Blanket Implementations§
Source§impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
Source§fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
Render this component or element with an animation
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
Source§impl<T> FluentBuilder for Twhere
T: IntoElement,
impl<T> FluentBuilder for Twhere
T: IntoElement,
Source§fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
Imperatively modify self with the given closure.
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
Conditionally modify self with the given closure.
Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
Conditionally modify self with the given closure.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more