cushy::context

Trait MapManagedWidget

Source
pub trait MapManagedWidget<T> {
    type Result;

    // Required method
    fn map(self, map: impl FnOnce(MountedWidget) -> T) -> Self::Result;
}
Expand description

A type that can produce another type when provided a MountedWidget.

Required Associated Types§

Source

type Result

The result of the mapping operation.

Required Methods§

Source

fn map(self, map: impl FnOnce(MountedWidget) -> T) -> Self::Result

Call map with a MountedWidget.

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.

Implementations on Foreign Types§

Source§

impl<T> MapManagedWidget<T> for Option<MountedWidget>

Source§

type Result = Option<T>

Source§

fn map(self, map: impl FnOnce(MountedWidget) -> T) -> Self::Result

Implementors§