Trait ParamOptExt

Source
pub trait ParamOptExt: Param + ParamExt {
    type OptItem;

    // Provided methods
    fn opt_map<U, F>(self, f: F) -> OptMap<Self, F>
       where F: Fn(Self::OptItem) -> U,
             Self: Sized { ... }
    fn opt_try_map<U, E, F>(self, f: F) -> OptTryMap<Self, F>
       where E: Debug,
             F: Fn(Self::OptItem) -> Result<U, E>,
             Self: Sized { ... }
    fn codepend<B>(self, b: B) -> Codepend<Self, B>
       where B: ParamOptExt,
             Self: Sized { ... }
    fn either<B>(self, b: B) -> Either<Self, B>
       where B: ParamOptExt,
             Self: Sized { ... }
    fn either_homogeneous<B>(self, b: B) -> EitherHomogeneous<Self, B>
       where B: ParamOptExt<OptItem = Self::OptItem>,
             Self: Sized { ... }
    fn with_default(
        self,
        default: Self::OptItem,
    ) -> WithDefault<Self, Self::OptItem>
       where Self: Sized { ... }
    fn required(self) -> Required<Self>
       where Self: Sized { ... }
    fn opt_convert<F, U, E>(self, f: F) -> OptConvert<Self, F>
       where E: Debug + Display,
             F: Fn(Self::OptItem) -> Result<U, E>,
             Self: Sized,
             Self::OptItem: Clone + Debug { ... }
    fn otherwise<B>(self, b: B) -> Otherwise<Self, B>
       where B: Param,
             Self: Sized { ... }
}

Required Associated Types§

Provided Methods§

Source

fn opt_map<U, F>(self, f: F) -> OptMap<Self, F>
where F: Fn(Self::OptItem) -> U, Self: Sized,

Source

fn opt_try_map<U, E, F>(self, f: F) -> OptTryMap<Self, F>
where E: Debug, F: Fn(Self::OptItem) -> Result<U, E>, Self: Sized,

Source

fn codepend<B>(self, b: B) -> Codepend<Self, B>
where B: ParamOptExt, Self: Sized,

Source

fn either<B>(self, b: B) -> Either<Self, B>
where B: ParamOptExt, Self: Sized,

Source

fn either_homogeneous<B>(self, b: B) -> EitherHomogeneous<Self, B>
where B: ParamOptExt<OptItem = Self::OptItem>, Self: Sized,

Source

fn with_default( self, default: Self::OptItem, ) -> WithDefault<Self, Self::OptItem>
where Self: Sized,

Source

fn required(self) -> Required<Self>
where Self: Sized,

Source

fn opt_convert<F, U, E>(self, f: F) -> OptConvert<Self, F>
where E: Debug + Display, F: Fn(Self::OptItem) -> Result<U, E>, Self: Sized, Self::OptItem: Clone + Debug,

Source

fn otherwise<B>(self, b: B) -> Otherwise<Self, B>
where B: Param, Self: Sized,

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, P> ParamOptExt for P
where P: Param<Item = Option<T>> + ?Sized,