Struct crates_io::Registry[][src]

pub struct Registry { /* fields omitted */ }

Implementations

impl Registry[src]

pub fn new_handle(host: String, token: Option<String>, handle: Easy) -> Registry[src]

Creates a new Registry.

Example

use curl::easy::Easy;
use crates_io::Registry;

let mut handle = Easy::new();
// If connecting to crates.io, a user-agent is required.
handle.useragent("my_crawler (example.com/info)");
let mut reg = Registry::new_handle(String::from("https://crates.io"), None, handle);

pub fn host(&self) -> &str[src]

pub fn host_is_crates_io(&self) -> bool[src]

pub fn add_owners(&mut self, krate: &str, owners: &[&str]) -> Result<String>[src]

pub fn remove_owners(&mut self, krate: &str, owners: &[&str]) -> Result<()>[src]

pub fn list_owners(&mut self, krate: &str) -> Result<Vec<User>>[src]

pub fn publish(&mut self, krate: &NewCrate, tarball: &File) -> Result<Warnings>[src]

pub fn search(&mut self, query: &str, limit: u32) -> Result<(Vec<Crate>, u32)>[src]

pub fn yank(&mut self, krate: &str, version: &str) -> Result<()>[src]

pub fn unyank(&mut self, krate: &str, version: &str) -> Result<()>[src]

Auto Trait Implementations

impl !RefUnwindSafe for Registry

impl Send for Registry

impl !Sync for Registry

impl Unpin for Registry

impl !UnwindSafe for Registry

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.