pub struct SessionClient<S, T, U> { /* private fields */ }
Available on crate feature
agent
only.Expand description
A client that maintains session data and manages endpoints and XRPC headers.
It is recommended to use this struct internally in higher-level clients such as XrpcClient
, which can automatically update tokens.
Implementations§
Source§impl<S, T, U> SessionClient<S, T, U>
impl<S, T, U> SessionClient<S, T, U>
pub fn new(store: Arc<SessionWithEndpointStore<S, U>>, http_client: T) -> Self
Trait Implementations§
Source§impl<S, T, U> Clone for SessionClient<S, T, U>
impl<S, T, U> Clone for SessionClient<S, T, U>
Source§impl<S, T, U> CloneWithProxy for SessionClient<S, T, U>
impl<S, T, U> CloneWithProxy for SessionClient<S, T, U>
Source§impl<S, T, U> Configure for SessionClient<S, T, U>
impl<S, T, U> Configure for SessionClient<S, T, U>
Source§impl<S, T, U> HttpClient for SessionClient<S, T, U>
impl<S, T, U> HttpClient for SessionClient<S, T, U>
Source§impl<S, T, U> XrpcClient for SessionClient<S, T, U>
impl<S, T, U> XrpcClient for SessionClient<S, T, U>
Get the authorization token to use
Authorization
header.Source§async fn atproto_proxy_header(&self) -> Option<String>
async fn atproto_proxy_header(&self) -> Option<String>
Get the
atproto-proxy
header.Source§async fn atproto_accept_labelers_header(&self) -> Option<Vec<String>>
async fn atproto_accept_labelers_header(&self) -> Option<Vec<String>>
Get the
atproto-accept-labelers
header.Source§fn send_xrpc<P, I, O, E>(
&self,
request: &XrpcRequest<P, I>,
) -> impl Future<Output = Result<OutputDataOrBytes<O>, Error<E>>> + Send
fn send_xrpc<P, I, O, E>( &self, request: &XrpcRequest<P, I>, ) -> impl Future<Output = Result<OutputDataOrBytes<O>, Error<E>>> + Send
Send an XRPC request and return the response.
Auto Trait Implementations§
impl<S, T, U> !Freeze for SessionClient<S, T, U>
impl<S, T, U> RefUnwindSafe for SessionClient<S, T, U>
impl<S, T, U> Send for SessionClient<S, T, U>
impl<S, T, U> Sync for SessionClient<S, T, U>
impl<S, T, U> Unpin for SessionClient<S, T, U>
impl<S, T, U> UnwindSafe for SessionClient<S, T, U>
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