pub struct Info { /* private fields */ }Implementations§
Source§impl Info
impl Info
pub fn new() -> Self
Sourcepub fn fetch(
&self,
crates: Vec<&str>,
_opts: &InfoOpts,
) -> Result<Vec<ApiResponse>>
pub fn fetch( &self, crates: Vec<&str>, _opts: &InfoOpts, ) -> Result<Vec<ApiResponse>>
Fetch all the information about the crate
pub fn show(response: Vec<ApiResponse>, opts: &InfoOpts)
Sourcepub fn show_txt(response: &[ApiResponse], opts: Option<&InfoOpts>)
pub fn show_txt(response: &[ApiResponse], opts: Option<&InfoOpts>)
Print a formatted output to the console.
Sourcepub fn show_json(response: &Vec<ApiResponse>)
pub fn show_json(response: &Vec<ApiResponse>)
Show the reponse as a json object. If there is a single object, it will be taken out of the array. An json array is returned oherwise.
pub fn search(&self, pattern: &str, page_size: u64) -> Result<Vec<Crate>>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Info
impl !RefUnwindSafe for Info
impl Send for Info
impl Sync for Info
impl Unpin for Info
impl !UnwindSafe for Info
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