pub struct Registry { /* private fields */ }
Implementations§
source§impl Registry
impl Registry
sourcepub fn new_handle(
host: String,
token: Option<String>,
handle: Easy,
auth_required: bool
) -> Registry
pub fn new_handle( host: String, token: Option<String>, handle: Easy, auth_required: bool ) -> Registry
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);