Trait OptionExt

Source
pub trait OptionExt<T>: Sized {
    // Required method
    fn zip_ext<U>(self, other: Option<U>) -> Option<(T, U)>;

    // Provided method
    fn zip<U>(self, other: Option<U>) -> Option<(T, U)> { ... }
}

Required Methods§

Source

fn zip_ext<U>(self, other: Option<U>) -> Option<(T, U)>

Provided Methods§

Source

fn zip<U>(self, other: Option<U>) -> Option<(T, U)>

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> OptionExt<T> for Option<T>

Source§

fn zip_ext<U>(self, other: Option<U>) -> Option<(T, U)>

Implementors§