pub fn yank(
        &mut self,
        crate_name: impl Into<String>,
        version: &Version,
    ) -> WrappedResult<(), NotFoundError, IoError> {
        block_on(self.async_tree.yank(crate_name, version))
    }
/// Mark a selected version of a crate as 'yanked'.
///
/// # Example
///
/// ```no_run
/// # use crate_index::{blocking::tree::Tree, Error, tree::NotFoundError};
/// #
/// # fn main() -> Result<(), Error> {
/// #    let mut tree = Tree::initialise("root", "download")
/// #        .build()
/// #        .expect("couldn't create tree");
/// #
/// let crate_name = "some-crate";
/// let version = "0.1.0".parse().unwrap();
///
/// match tree.yank(crate_name, &version)? {
///     Ok(()) => println!("crate yanked!"),
///     Err(NotFoundError::Crate(e)) => println!("crate not found! ({})", e.crate_name()),
///     Err(NotFoundError::Version(e)) => println!("version not found! ({})", e.version()),
/// }
/// #
/// #     Ok(())
/// # }
/// ```
///
/// # Errors
///
/// ## Outer Error
///
/// an [`IoError`] is returned if the filesystem cannot be read or written
/// to.
///
/// ## Inner Error
///
/// This function will return [`NotFoundError`] if the crate or the
/// selected version does not exist in the index.
Mark a selected version of a crate as 'yanked'.
Mark a selected version of a crate as ' yanked ' .
pub fn yank(
        &mut self,
        crate_name: impl Into<String>,
        version: &Version,
    ) -> WrappedResult<(), NotFoundError, IoError> {
        block_on(self.async_tree.yank(crate_name, version))
    }
pub fn yank ( & mut self , crate_name : impl Into < String > , version : & Version , ) -> WrappedResult < ( ) , NotFoundError , IoError > { block_on ( self . async_tree . yank ( crate_name , version ) ) }
Mark a selected version of a crate as 'yanked'.
Mark a selected version of a crate as ' yanked ' .
&mut self
crate_name
impl Into<String>
version
&Version
example
None
use crate_index::{blocking::tree::tree, error, tree::notfounderror};
None
fn main() -> result<(), error> {
None
let mut tree = tree::initialise("root", "download")
None
.build()
None
.expect("couldn't create tree");
let crate_name = "some-crate";
let version = "0.1.0".parse().unwrap().

match tree.yank(crate_name, &version). {
Ok(()) => println!("crate yanked!"),
Err(NotFoundError::Crate(e)) => println!("crate not found. ({})", e.crate_name()),
Err(NotFoundError::Version(e)) => println!("version not found.
let crate_name = " some - crate " ; let version = " 0 . 1 . 0 " . parse () . unwrap () . match tree . yank ( crate_name &version ) . { Ok (( )) = > println! ( " crate yanked! " ) Err ( NotFoundError :: Crate ( e )) = > println! ( " crate not found . ( {} ) " e . crate_name () ) Err ( NotFoundError :: Version ( e )) = > println! ( " version not found .
ok(())
None
}
None
errors
None
outer error
an [`IoError`] is returned if the filesystem cannot be read or written
to.
an [ ` IoError ` ] is returned if the filesystem cannot be read or written to .
inner error
This function will return [`NotFoundError`] if the crate or the
selected version does not exist in the index.
This function will return [ ` NotFoundError ` ] if the crate or the selected version does not exist in the index .