Enum cursive::view::SizeConstraint [−][src]
Single-dimensional constraint on a view size.
This describes a possible behaviour for a BoxView
.
Variants
Free
No constraint imposed, the child view's response is used.
Full
Tries to take all available space, no matter what the child needs.
Fixed(usize)
Always return the included size, no matter what the child needs.
AtMost(usize)
Returns the minimum of the included value and the child view's size.
AtLeast(usize)
Returns the maximum of the included value and the child view's size.
Methods
impl SizeConstraint
[src]
impl SizeConstraint
pub fn available(self, available: usize) -> usize
[src]
pub fn available(self, available: usize) -> usize
Returns the size to be given to the child.
When available
is offered to the BoxView
.
pub fn result(self, (result, available): (usize, usize)) -> usize
[src]
pub fn result(self, (result, available): (usize, usize)) -> usize
Returns the size the child view should actually use.
When it said it wanted result
.
Trait Implementations
impl Debug for SizeConstraint
[src]
impl Debug for SizeConstraint
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for SizeConstraint
[src]
impl Clone for SizeConstraint
fn clone(&self) -> SizeConstraint
[src]
fn clone(&self) -> SizeConstraint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for SizeConstraint
[src]
impl Copy for SizeConstraint
Auto Trait Implementations
impl Send for SizeConstraint
impl Send for SizeConstraint
impl Sync for SizeConstraint
impl Sync for SizeConstraint