Struct cursive::view::SizeCache [] [src]

pub struct SizeCache {
    pub value: usize,
    pub constrained: bool,
}

Cache around a one-dimensional layout result

Fields

value: usize

Cached value

constrained: bool

true if the last size was constrained.

If unconstrained, any request larger than this value would return the same size.

Methods

impl SizeCache
[src]

fn new(value: usize, constrained: bool) -> Self

Creates a new sized cache

fn accept(self, request: usize) -> bool

Returns true if self is still valid for the given request.

Trait Implementations

impl Copy for SizeCache
[src]

impl Clone for SizeCache
[src]

fn clone(&self) -> SizeCache

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for SizeCache
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl PartialEq for SizeCache
[src]

fn eq(&self, __arg_0: &SizeCache) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &SizeCache) -> bool

This method tests for !=.