[][src]Struct cursive_core::views::BoxedView

pub struct BoxedView { /* fields omitted */ }

A boxed View.

It derefs to the wrapped view.

Implementations

impl BoxedView[src]

pub fn new(view: Box<dyn View>) -> Self[src]

Creates a new BoxedView around the given boxed view.

pub fn boxed<T>(view: T) -> Self where
    T: IntoBoxedView
[src]

Box the given view

pub fn unwrap(self) -> Box<dyn View>[src]

Returns the inner boxed view.

Methods from Deref<Target = dyn View>

pub fn downcast_ref<T: Any>(&self) -> Option<&T>[src]

Attempts to downcast self to a concrete type.

pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>[src]

Attempts to downcast self to a concrete type.

pub fn is<T: Any>(&self) -> bool[src]

Checks if this view is of type T.

Trait Implementations

impl Deref for BoxedView[src]

type Target = dyn View

The resulting type after dereferencing.

impl DerefMut for BoxedView[src]

impl ViewWrapper for BoxedView[src]

type V = dyn View

Type that this view wraps.

Auto Trait Implementations

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.