pub fn map_filter<T, U, E>(mut self, map: U) -> Result<Io<T>, E>
    where
        T: Filter,
        U: FnOnce(F) -> Result<T, E>,
    {
        // replace current filter
        let filter = unsafe {
            let filter = Box::new(map(*(self.1.get_filter()))?);
            let filter_ref: &'static dyn Filter = {
                let filter: &dyn Filter = filter.as_ref();
                std::mem::transmute(filter)
            };
            self.0 .0.filter.replace(filter_ref);
            filter
        };

        Ok(Io(self.0.clone(), FilterItem::with_filter(filter)))
    }
/// Map current filter with new one
Map current filter with new one
Map current filter with new one
pub fn map_filter<T, U, E>(mut self, map: U) -> Result<Io<T>, E>
    where
        T: Filter,
        U: FnOnce(F) -> Result<T, E>,
    {
        // replace current filter
        let filter = unsafe {
            let filter = Box::new(map(*(self.1.get_filter()))?);
            let filter_ref: &'static dyn Filter = {
                let filter: &dyn Filter = filter.as_ref();
                std::mem::transmute(filter)
            };
            self.0 .0.filter.replace(filter_ref);
            filter
        };
        Ok(Io(self.0.clone(), FilterItem::with_filter(filter)))
    }
pub fn map_filter < T , U , E > ( mut self , map : U ) -> Result < Io < T > , E > where T : Filter , U : FnOnce ( F ) -> Result < T , E > , { // replace current filter let filter = unsafe { let filter = Box :: new ( map ( * ( self . 1 . get_filter ( ) ) ) ? ) ; let filter_ref : & ' static dyn Filter = { let filter : & dyn Filter = filter . as_ref ( ) ; std :: mem :: transmute ( filter ) } ; self . 0 . 0 . filter . replace ( filter_ref ) ; filter } ; Ok ( Io ( self . 0 . clone ( ) , FilterItem :: with_filter ( filter ) ) ) }
Map current filter with new one
Map current filter with new one
mut self
map
U
mut self
map
U