pub struct Agent { /* private fields */ }Implementations§
source§impl Agent
impl Agent
sourcepub async fn new() -> AgentResult<Self>
pub async fn new() -> AgentResult<Self>
Asynchronous version of the crate::Agent::new().
sourcepub fn get_socket_path(&self) -> Option<&str>
pub fn get_socket_path(&self) -> Option<&str>
Retrives the agent socket path.
§Examples
let agent = Agent::new()?;
assert_eq!(agent.get_socket_path(), Some("/tmp/oidc-agent-service-1000/oidc-agent.sock"))sourcepub async fn get_access_token(
&self,
account_shortname: &str,
) -> AgentResult<Token>
pub async fn get_access_token( &self, account_shortname: &str, ) -> AgentResult<Token>
Asynchronous version of crate::Agent::get_access_token().
sourcepub async fn get_access_token_full(
&self,
account_shortname: &str,
) -> AgentResult<AccessTokenResponse>
pub async fn get_access_token_full( &self, account_shortname: &str, ) -> AgentResult<AccessTokenResponse>
Asynchronous version of crate::Agent::get_access_token_full().
sourcepub async fn get_mytoken(&self, account_shortname: &str) -> AgentResult<Token>
pub async fn get_mytoken(&self, account_shortname: &str) -> AgentResult<Token>
Asynchronous version of crate::Agent::get_mytoken().
sourcepub async fn get_mytoken_full(
&self,
account_shortname: &str,
) -> AgentResult<MyTokenResponse>
pub async fn get_mytoken_full( &self, account_shortname: &str, ) -> AgentResult<MyTokenResponse>
Asynchronous version of crate::Agent::get_mytoken_full().
sourcepub async fn get_loaded_accounts(&self) -> AgentResult<Vec<String>>
pub async fn get_loaded_accounts(&self) -> AgentResult<Vec<String>>
Asynchronous version of crate::Agent::get_loaded_accounts().
sourcepub async fn send_request<T>(
&self,
request: T,
) -> AgentResult<T::SuccessResponse>where
T: Request,
pub async fn send_request<T>(
&self,
request: T,
) -> AgentResult<T::SuccessResponse>where
T: Request,
Asynchronous version of crate::Agent::send_request().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Agent
impl RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnwindSafe for Agent
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)