pub struct AccountSession { /* private fields */ }Expand description
The Provider Account a single invocation runs under.
§Examples
use ironflow_core::account::{AccountCredential, AccountSession, RateLimitRecorder};
let session = AccountSession::new(
AccountCredential::new("CLAUDE_CODE_OAUTH_TOKEN", "secret".to_string()),
RateLimitRecorder::default(),
);
assert_eq!(session.credential().env_var(), "CLAUDE_CODE_OAUTH_TOKEN");
assert!(!format!("{session:?}").contains("secret"));Implementations§
Source§impl AccountSession
impl AccountSession
Sourcepub fn new(credential: AccountCredential, recorder: RateLimitRecorder) -> Self
pub fn new(credential: AccountCredential, recorder: RateLimitRecorder) -> Self
Build a session from a credential and the recorder observations go to.
§Examples
See AccountSession.
Sourcepub fn credential(&self) -> &AccountCredential
pub fn credential(&self) -> &AccountCredential
Sourcepub fn recorder(&self) -> &RateLimitRecorder
pub fn recorder(&self) -> &RateLimitRecorder
The recorder observed windows are pushed to.
§Examples
use ironflow_core::account::{AccountCredential, AccountSession, RateLimitRecorder};
let recorder = RateLimitRecorder::default();
let session = AccountSession::new(AccountCredential::new("T", "v".to_string()), recorder);
assert!(session.recorder().take().is_empty());Trait Implementations§
Source§impl Clone for AccountSession
impl Clone for AccountSession
Auto Trait Implementations§
impl Freeze for AccountSession
impl RefUnwindSafe for AccountSession
impl Send for AccountSession
impl Sync for AccountSession
impl Unpin for AccountSession
impl UnsafeUnpin for AccountSession
impl UnwindSafe for AccountSession
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