[][src]Struct cursive::views::NamedView

pub struct NamedView<V: View> { /* fields omitted */ }

Wrapper around a view to make it identifiable.

This lets other views refer to this one using a string identifier.

See Identifiable for an easy way to wrap any view with it.

Methods

impl<V: View> NamedView<V>[src]

pub fn new<S: Into<String>>(id: S, view: V) -> Self[src]

Wraps view in a new NamedView.

pub fn get_mut(&mut self) -> ViewRef<V>[src]

Gets mutable access to the inner view.

This returns a ViewRef<V>, which implement DerefMut<Target = V>.

Panics

Panics if another reference for this view already exists.

Trait Implementations

impl<T: View + 'static> ViewWrapper for NamedView<T>[src]

type V = T

Type that this view wraps.

Auto Trait Implementations

impl<V> !RefUnwindSafe for NamedView<V>

impl<V> !Send for NamedView<V>

impl<V> !Sync for NamedView<V>

impl<V> Unpin for NamedView<V>

impl<V> !UnwindSafe for NamedView<V>

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.