Trait SignalExtMapOption

Source
pub trait SignalExtMapOption<T>: Sized {
    // Provided methods
    fn map_some<F, U>(self, f: F) -> MapSome<Self, T, F, U>
       where F: FnMut(&T) -> U { ... }
    fn map_some_default<F, U>(self, f: F) -> MapSomeDefault<Self, T, F, U>
       where F: FnMut(&T) -> U,
             U: Default { ... }
    fn and_then_some<F, U>(self, f: F) -> AndThenSome<Self, T, F, U>
       where F: FnMut(&T) -> Option<U> { ... }
    fn unwrap_or_default(self) -> UnwrapOrDefault<Self, T>
       where T: Default { ... }
}

Provided Methods§

Source

fn map_some<F, U>(self, f: F) -> MapSome<Self, T, F, U>
where F: FnMut(&T) -> U,

Source

fn map_some_default<F, U>(self, f: F) -> MapSomeDefault<Self, T, F, U>
where F: FnMut(&T) -> U, U: Default,

Source

fn and_then_some<F, U>(self, f: F) -> AndThenSome<Self, T, F, U>
where F: FnMut(&T) -> Option<U>,

Source

fn unwrap_or_default(self) -> UnwrapOrDefault<Self, T>
where T: Default,

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, S> SignalExtMapOption<T> for S
where S: Signal<Item = Option<T>>,