pub async fn clear_type<V>(&self) -> Result<(), Error>
    where
        V: Send + Sync + 'static,
    {
        let value_id = TypeId::of::<V>();

        let (tx, rx) = oneshot::channel();

        let req = CacheReq::ClearType(value_id, tx);

        self.sender.unbounded_send(req).map_err(|_| Error::MainUnreachable)?;

        let resp = rx.await.map_err(|_| Error::Other)?;

        match resp {
            CacheResp::Done => return Ok(()),
            CacheResp::Err(err) => return Err(err),
            _ => return Err(Error::Internal),
        }
    }
/// Try to delete all values of type `V` saved under __any__ type of key, leaving values of other types
/// untouched.
Try to delete all values of type `V` saved under __any__ type of key, leaving values of other types
untouched.
Try to delete all values of type ` V ` saved under __any__ type of key leaving values of other types untouched .
pub async fn clear_type<V>(&self) -> Result<(), Error>
    where
        V: Send + Sync + 'static,
    {
        let value_id = TypeId::of::<V>();
        let (tx, rx) = oneshot::channel();
        let req = CacheReq::ClearType(value_id, tx);
        self.sender.unbounded_send(req).map_err(|_| Error::MainUnreachable)?;
        let resp = rx.await.map_err(|_| Error::Other)?;
        match resp {
            CacheResp::Done => return Ok(()),
            CacheResp::Err(err) => return Err(err),
            _ => return Err(Error::Internal),
        }
    }
pub async fn clear_type < V > ( & self ) -> Result < ( ) , Error > where V : Send + Sync + ' static , { let value_id = TypeId :: of :: < V > ( ) ; let ( tx , rx ) = oneshot :: channel ( ) ; let req = CacheReq :: ClearType ( value_id , tx ) ; self . sender . unbounded_send ( req ) . map_err ( | _ | Error :: MainUnreachable ) ? ; let resp = rx . await . map_err ( | _ | Error :: Other ) ? ; match resp { CacheResp :: Done => return Ok ( ( ) ) , CacheResp :: Err ( err ) => return Err ( err ) , _ => return Err ( Error :: Internal ) , } }
Try to delete all values of type `V` saved under __any__ type of key, leaving values of other types
untouched.
Try to delete all values of type ` V ` saved under __any__ type of key leaving values of other types untouched .
&self
&self