Trait OptionExt

Source
pub trait OptionExt<T: CubeType> {
    // Required methods
    fn __expand_unwrap_or_else_method(
        self,
        _context: &mut CubeContext,
        other: impl FnOnce(&mut CubeContext) -> T::ExpandType,
    ) -> T::ExpandType;
    fn __expand_unwrap_or_method(
        self,
        _context: &mut CubeContext,
        other: T::ExpandType,
    ) -> T::ExpandType;
}

Required Methods§

Source

fn __expand_unwrap_or_else_method( self, _context: &mut CubeContext, other: impl FnOnce(&mut CubeContext) -> T::ExpandType, ) -> T::ExpandType

Source

fn __expand_unwrap_or_method( self, _context: &mut CubeContext, other: T::ExpandType, ) -> T::ExpandType

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: CubeType + Into<T::ExpandType>> OptionExt<T> for Option<T>

Source§

fn __expand_unwrap_or_else_method( self, context: &mut CubeContext, other: impl FnOnce(&mut CubeContext) -> <T as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType

Source§

fn __expand_unwrap_or_method( self, _context: &mut CubeContext, other: <T as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType

Implementors§