pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub async fn new(endpoint: &str, token: Option<String>) -> Self
pub async fn from_reqwest( endpoint: &str, token: Option<String>, client: Client, ) -> Self
pub async fn fetch_index(&self, name: &str) -> Result<Vec<CrateVersion>>
pub async fn download_crate( &self, name: &str, version: &Version, ) -> Result<Vec<u8>>
pub async fn publish( &self, version: &Publish, tarball: &[u8], ) -> Result<CompletedPublication>
pub async fn list( &self, per_page: Option<usize>, page: Option<usize>, ) -> Result<ListAll>
pub async fn register(&mut self, username: &str) -> Result<()>
pub async fn set_token(&mut self, token: String)
pub fn token(&self) -> Option<&str>
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more