SingleWidget

Trait SingleWidget 

Source
pub trait SingleWidget<T: DynamicWidget>:
    DynamicWidget
    + Deref
    + DerefMut {
    type Borrowed<'a>: Deref<Target = T>
       where T: 'a,
             Self: 'a;
    type BorrowedMut<'a>: DerefMut<Target = T>
       where T: 'a,
             Self: 'a;

    // Required methods
    fn child(&self) -> Self::Borrowed<'_>;
    fn child_mut(&mut self) -> Self::BorrowedMut<'_>;
}

Required Associated Types§

Source

type Borrowed<'a>: Deref<Target = T> where T: 'a, Self: 'a

Source

type BorrowedMut<'a>: DerefMut<Target = T> where T: 'a, Self: 'a

Required Methods§

Source

fn child(&self) -> Self::Borrowed<'_>

Source

fn child_mut(&mut self) -> Self::BorrowedMut<'_>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: DynamicConsoleDisplay<S> + StaticWidget, S: Pixel> SingleWidget<T> for UvWidget<T, S>

Source§

type Borrowed<'a> = &'a T where T: 'a, S: 'a

Source§

type BorrowedMut<'a> = &'a mut T where T: 'a, Self: 'a

Source§

impl<T: DynamicConsoleDisplay<S>, S: Pixel> SingleWidget<T> for DoubleBufferWidget<T, S>

Source§

type Borrowed<'a> = Ref<'a, T> where T: 'a, Self: 'a

Source§

type BorrowedMut<'a> = RefMut<'a, T> where T: 'a, Self: 'a

Source§

impl<T: DynamicWidget> SingleWidget<T> for PaddingWidget<T>

Source§

type Borrowed<'a> = &'a T where T: 'a, Self: 'a

Source§

type BorrowedMut<'a> = &'a mut T where T: 'a, Self: 'a