[][src]Struct cursive::views::Layer

pub struct Layer<T: View> { /* fields omitted */ }

Wrapper view that fills the background.

This is mostly used as layer in the StackView.

Implementations

impl<T: View> Layer<T>[src]

pub fn new(view: T) -> Self[src]

Wraps the given view.

pub fn with_color(view: T, color: ColorStyle) -> Self[src]

Wraps the given view with a custom background color.

pub fn color(&self) -> ColorStyle[src]

Gets the current color.

pub fn set_color(&mut self, color: ColorStyle)[src]

Sets the background color.

pub fn get_inner(&self) -> &T[src]

Gets access to the inner view.

pub fn get_inner_mut(&mut self) -> &mut T[src]

Gets mutable access to the inner view.

Trait Implementations

impl<T: Debug + View> Debug for Layer<T>[src]

impl<T: View> ViewWrapper for Layer<T>[src]

type V = T

Type that this view wraps.

Auto Trait Implementations

impl<T> RefUnwindSafe for Layer<T> where
    T: RefUnwindSafe

impl<T> Send for Layer<T> where
    T: Send

impl<T> Sync for Layer<T> where
    T: Sync

impl<T> Unpin for Layer<T> where
    T: Unpin

impl<T> UnwindSafe for Layer<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.