Space

Struct Space 

Source
pub struct Space { /* private fields */ }
Expand description

An amount of empty space.

It can be useful if you want to fill some space with nothing.

Implementations§

Source§

impl Space

Source

pub fn new(width: Length, height: Length) -> Self

Creates an amount of empty Space with the given width and height.

Source

pub fn with_width(width: Length) -> Self

Creates an amount of horizontal Space.

Source

pub fn with_height(height: Length) -> Self

Creates an amount of vertical Space.

Trait Implementations§

Source§

impl Debug for Space

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, Message> From<Space> for Element<'a, Message>

Source§

fn from(space: Space) -> Element<'a, Message>

Converts to this type from the input type.
Source§

impl<'a, Message> Widget<Message> for Space

Source§

fn node<'b>( &self, bump: &'b Bump, _publish: &Bus<Message>, _css: &mut Css<'b>, ) -> Node<'b>

Produces a VDOM node for the Widget.

Auto Trait Implementations§

§

impl Freeze for Space

§

impl RefUnwindSafe for Space

§

impl Send for Space

§

impl Sync for Space

§

impl Unpin for Space

§

impl UnwindSafe for Space

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>,

Source§

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>,

Source§

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.