pub async fn yank(
        &mut self,
        version: &Version,
    ) -> WrappedResult<(), VersionNotFoundError, IoError> {
        match self.get_mut(version) {
            Some(record) => {
                record.yank();
                self.save().await?;
                Ok(Ok(()))
            }
            None => Ok(Err(VersionNotFoundError {
                crate_name: self.crate_name.clone(),
                version: version.clone(),
            })),
        }
    }
/// Mark a selected version of the crate as 'yanked'.
///
/// # Errors
///
/// This function will return [`VersionNotFoundError`] if the selected
/// version does not exist in the index.
Mark a selected version of the crate as 'yanked'.
Mark a selected version of the crate as ' yanked ' .
pub async fn yank(
        &mut self,
        version: &Version,
    ) -> WrappedResult<(), VersionNotFoundError, IoError> {
        match self.get_mut(version) {
            Some(record) => {
                record.yank();
                self.save().await?;
                Ok(Ok(()))
            }
            None => Ok(Err(VersionNotFoundError {
                crate_name: self.crate_name.clone(),
                version: version.clone(),
            })),
        }
    }
pub async fn yank ( & mut self , version : & Version , ) -> WrappedResult < ( ) , VersionNotFoundError , IoError > { match self . get_mut ( version ) { Some ( record ) => { record . yank ( ) ; self . save ( ) . await ? ; Ok ( Ok ( ( ) ) ) } None => Ok ( Err ( VersionNotFoundError { crate_name : self . crate_name . clone ( ) , version : version . clone ( ) , } ) ) , } }
Mark a selected version of the crate as 'yanked'.
Mark a selected version of the crate as ' yanked ' .
&mut self
version
&Version
errors
This function will return [`VersionNotFoundError`] if the selected
version does not exist in the index.
This function will return [ ` VersionNotFoundError ` ] if the selected version does not exist in the index .