pub struct Users { /* private fields */ }
Expand description
Represents the users routes.
Implementations§
Source§impl Users
impl Users
Sourcepub async fn me(&self) -> Result<Me, Error>
pub async fn me(&self) -> Result<Me, Error>
Get the current authenticated user.
§Errors
This method will return an error if:
- The current user cannot be retrieved from the Hop API.
- The current user cannot be deserialized.
- The current user is not found.
- The client is not authenticated.
- The URL is invalid.
Sourcepub async fn payment_methods(&self) -> Result<Vec<PaymentMethod>, Error>
pub async fn payment_methods(&self) -> Result<Vec<PaymentMethod>, Error>
Get the current authenticated user’s payment methods.
§Errors
This method will return an error if:
- The current user cannot be retrieved from the Hop API.
- The current user cannot be deserialized.
- The current user is not found.
- The client is not authenticated.
- The URL is invalid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Users
impl !RefUnwindSafe for Users
impl Send for Users
impl Sync for Users
impl Unpin for Users
impl !UnwindSafe for Users
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