pub struct WhoamiResource<'a> { /* private fields */ }Expand description
client.whoami()
Implementations§
Source§impl<'a> WhoamiResource<'a>
impl<'a> WhoamiResource<'a>
Sourcepub fn get(&self) -> Result<Person>
pub fn get(&self) -> Result<Person>
Currently logged in user.
GET /whoami
This endpoint returns the current user. If the request is unauthorized, the anonymous user (aka public user) is returned.
Use Self::get_with to pass query parameters.
§Example
let whoami = client.whoami().get()?;
println!("{:?}", whoami.title);Trait Implementations§
Source§impl<'a> Clone for WhoamiResource<'a>
impl<'a> Clone for WhoamiResource<'a>
impl<'a> Copy for WhoamiResource<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for WhoamiResource<'a>
impl<'a> !UnwindSafe for WhoamiResource<'a>
impl<'a> Freeze for WhoamiResource<'a>
impl<'a> Send for WhoamiResource<'a>
impl<'a> Sync for WhoamiResource<'a>
impl<'a> Unpin for WhoamiResource<'a>
impl<'a> UnsafeUnpin for WhoamiResource<'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