Trait Resizable

Source
pub trait Resizable: Sized + View {
Show 13 methods // Provided methods fn resized( self, width: SizeConstraint, height: SizeConstraint, ) -> ResizedView<Self> { ... } fn fixed_size<S>(self, size: S) -> ResizedView<Self> where S: Into<XY<usize>> { ... } fn fixed_width(self, width: usize) -> ResizedView<Self> { ... } fn fixed_height(self, height: usize) -> ResizedView<Self> { ... } fn full_screen(self) -> ResizedView<Self> { ... } fn full_width(self) -> ResizedView<Self> { ... } fn full_height(self) -> ResizedView<Self> { ... } fn max_size<S>(self, size: S) -> ResizedView<Self> where S: Into<XY<usize>> { ... } fn max_width(self, max_width: usize) -> ResizedView<Self> { ... } fn max_height(self, max_height: usize) -> ResizedView<Self> { ... } fn min_size<S>(self, size: S) -> ResizedView<Self> where S: Into<XY<usize>> { ... } fn min_width(self, min_width: usize) -> ResizedView<Self> { ... } fn min_height(self, min_height: usize) -> ResizedView<Self> { ... }
}
Expand description

Makes a view wrappable in a ResizedView.

Provided Methods§

Source

fn resized( self, width: SizeConstraint, height: SizeConstraint, ) -> ResizedView<Self>

Wraps self in a ResizedView with the given size constraints.

Source

fn fixed_size<S>(self, size: S) -> ResizedView<Self>
where S: Into<XY<usize>>,

Wraps self into a fixed-size ResizedView.

Source

fn fixed_width(self, width: usize) -> ResizedView<Self>

Wraps self into a fixed-width ResizedView.

Source

fn fixed_height(self, height: usize) -> ResizedView<Self>

Wraps self into a fixed-width ResizedView.

Source

fn full_screen(self) -> ResizedView<Self>

Wraps self into a full-screen ResizedView.

Source

fn full_width(self) -> ResizedView<Self>

Wraps self into a full-width ResizedView.

Source

fn full_height(self) -> ResizedView<Self>

Wraps self into a full-height ResizedView.

Source

fn max_size<S>(self, size: S) -> ResizedView<Self>
where S: Into<XY<usize>>,

Wraps self into a limited-size ResizedView.

Source

fn max_width(self, max_width: usize) -> ResizedView<Self>

Wraps self into a limited-width ResizedView.

Source

fn max_height(self, max_height: usize) -> ResizedView<Self>

Wraps self into a limited-height ResizedView.

Source

fn min_size<S>(self, size: S) -> ResizedView<Self>
where S: Into<XY<usize>>,

Wraps self into a ResizedView at least sized size.

Source

fn min_width(self, min_width: usize) -> ResizedView<Self>

Wraps self in a ResizedView at least min_width wide.

Source

fn min_height(self, min_height: usize) -> ResizedView<Self>

Wraps self in a ResizedView at least min_height tall.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> Resizable for T
where T: View,