pub struct Agent<M>{
pub api: Service<Wrapper<M>>,
/* private fields */
}
Available on crate feature
agent
only.Expand description
A wrapper around a session manager and a client service.
An agent provides the following utilities:
- AT Protocol labelers configuration utilities
- AT Protocol proxy configuration utilities
- Cloning utilities (if the session manager implements
CloneWithProxy
)
§Example
use atrium_api::agent::atp_agent::{store::MemorySessionStore, CredentialSession};
use atrium_api::agent::Agent;
use atrium_xrpc_client::reqwest::ReqwestClient;
let session = CredentialSession::new(
ReqwestClient::new("https://bsky.social"),
MemorySessionStore::default(),
);
let agent = Agent::new(session);
Fields§
§api: Service<Wrapper<M>>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<M> Freeze for Agent<M>
impl<M> RefUnwindSafe for Agent<M>where
M: RefUnwindSafe,
impl<M> Send for Agent<M>
impl<M> Sync for Agent<M>
impl<M> Unpin for Agent<M>
impl<M> UnwindSafe for Agent<M>where
M: RefUnwindSafe,
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