#[non_exhaustive]pub struct Users<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Users<'a>
impl<'a> Users<'a>
Sourcepub async fn list(
&self,
cfg: Option<Params>,
) -> Result<Vec<User>, Box<dyn Error>>
pub async fn list( &self, cfg: Option<Params>, ) -> Result<Vec<User>, Box<dyn Error>>
Fetches a list of users.
Sourcepub async fn user(&self, username: &str) -> Result<User, Box<dyn Error>>
pub async fn user(&self, username: &str) -> Result<User, Box<dyn Error>>
Fetches a specific user. If authenticated, it will show a few more fields. If the current authenticated user is the same as the user being fetched, a few more fields will exist.
§Errors
Will error if the user does not exist.
Sourcepub async fn contextual_info(
&self,
username: &str,
cfg: Option<Params>,
) -> Result<User, Box<dyn Error>>
Available on crate feature auth
only.
pub async fn contextual_info( &self, username: &str, cfg: Option<Params>, ) -> Result<User, Box<dyn Error>>
auth
only.Fetches contextual info (like the hovercard you see on github). Requires auth. It can either work with the username alone (and then it will fetch profile data), or it can work with a subject type (like “repository”) and id (the repository’s id on the API).
§Errors
Will error if the user doesn’t exist.
Auto Trait Implementations§
impl<'a> Freeze for Users<'a>
impl<'a> !RefUnwindSafe for Users<'a>
impl<'a> Send for Users<'a>
impl<'a> Sync for Users<'a>
impl<'a> Unpin for Users<'a>
impl<'a> !UnwindSafe for Users<'a>
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