pub struct MeResource { /* private fields */ }Expand description
The authenticated principal — the current user, the accounts they can access, and self-service
password reset. Backed by /api/v2/user (the user spec).
Implementations§
Source§impl MeResource
impl MeResource
Sourcepub async fn get(&self) -> Result<UserItemResponse, ManagerError>
pub async fn get(&self) -> Result<UserItemResponse, ManagerError>
Get the current user.
Sourcepub async fn customer(&self) -> Result<UserCustomerItemResponse, ManagerError>
pub async fn customer(&self) -> Result<UserCustomerItemResponse, ManagerError>
Get the current user together with their account (customer) information.
Sourcepub async fn accounts(&self) -> Result<Vec<Account>, ManagerError>
pub async fn accounts(&self) -> Result<Vec<Account>, ManagerError>
List the accounts the current user can access.
Sourcepub async fn reset_password(&self) -> Result<(), ManagerError>
pub async fn reset_password(&self) -> Result<(), ManagerError>
Request a password-reset email for the current user.
Auto Trait Implementations§
impl !RefUnwindSafe for MeResource
impl !UnwindSafe for MeResource
impl Freeze for MeResource
impl Send for MeResource
impl Sync for MeResource
impl Unpin for MeResource
impl UnsafeUnpin for MeResource
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