pub struct RainySessionClient { /* private fields */ }Implementations§
Source§impl RainySessionClient
impl RainySessionClient
pub fn new() -> Result<Self>
pub fn with_config(config: SessionConfig) -> Result<Self>
pub fn with_base_url(base_url: impl Into<String>) -> Result<Self>
pub fn set_access_token(&mut self, access_token: impl Into<String>)
pub fn clear_access_token(&mut self)
pub fn access_token(&self) -> Option<&str>
pub fn base_url(&self) -> &str
pub async fn login( &mut self, email: &str, password: &str, ) -> Result<LoginResponse>
pub async fn register( &mut self, email: &str, password: &str, region: &str, ) -> Result<LoginResponse>
pub async fn refresh(&mut self, refresh_token: &str) -> Result<RefreshResponse>
pub async fn me(&self) -> Result<SessionUser>
pub async fn org_me(&self) -> Result<OrgProfile>
pub async fn list_api_keys(&self) -> Result<Vec<SessionApiKeyListItem>>
pub async fn create_api_key( &self, name: &str, key_type: Option<&str>, ) -> Result<CreatedApiKey>
pub async fn delete_api_key(&self, id: &str) -> Result<Value>
pub async fn usage_credits(&self) -> Result<UsageCreditsResponse>
pub async fn usage_stats(&self, days: Option<u32>) -> Result<UsageStatsResponse>
Trait Implementations§
Source§impl Clone for RainySessionClient
impl Clone for RainySessionClient
Source§fn clone(&self) -> RainySessionClient
fn clone(&self) -> RainySessionClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RainySessionClient
impl !RefUnwindSafe for RainySessionClient
impl Send for RainySessionClient
impl Sync for RainySessionClient
impl Unpin for RainySessionClient
impl UnsafeUnpin for RainySessionClient
impl !UnwindSafe for RainySessionClient
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