Struct composable::views::Fixed

source ·
pub struct Fixed<V> { /* private fields */ }
Available on crate features unstable and views only.
Expand description

Trait Implementations§

source§

impl<V: View> View for Fixed<V>

source§

fn size(&self) -> Size

The intrinsic size of the View
source§

fn event(&self, event: Event, offset: Point, bounds: Bounds)

User-interface Event handling of the View
source§

fn draw(&self, bounds: Bounds, onto: &mut impl Output)

How the View is drawn
source§

fn padding(self, top: f32, right: f32, bottom: f32, left: f32) -> Padding<Self>

Add padding to all sides of the View
source§

fn padding_top(self, pad: f32) -> Padding<Self>

Add padding to the top of the View
source§

fn padding_right(self, pad: f32) -> Padding<Self>

Add padding to the right side of the View
source§

fn padding_bottom(self, pad: f32) -> Padding<Self>

Add padding to the bottom of the View
source§

fn padding_left(self, pad: f32) -> Padding<Self>

Add padding to the left side of the View
source§

fn padding_horizontal(self, pad: f32) -> Padding<Self>

Add padding to the horizontal sides of the View
source§

fn padding_vertical(self, pad: f32) -> Padding<Self>

Add padding to the vertical sides of the View
source§

fn padding_both(self, horizontal: f32, vertical: f32) -> Padding<Self>

Add different padding to the horizontal and vertical sides of the View
source§

fn padding_all(self, pad: f32) -> Padding<Self>

Add the same padding to all sides of the View
source§

fn fixed(self, width: f32, height: f32) -> impl View

Set the size of the View to a fixed value.
source§

fn width(self, width: f32) -> impl View

source§

fn height(self, height: f32) -> impl View

source§

fn across(self) -> impl View

Causes a tuple of Views to cascade horizontally, rather than vertically. Read more

Auto Trait Implementations§

§

impl<V> Freeze for Fixed<V>
where V: Freeze,

§

impl<V> RefUnwindSafe for Fixed<V>
where V: RefUnwindSafe,

§

impl<V> Send for Fixed<V>
where V: Send,

§

impl<V> Sync for Fixed<V>
where V: Sync,

§

impl<V> Unpin for Fixed<V>
where V: Unpin,

§

impl<V> UnwindSafe for Fixed<V>
where V: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.