pub struct BskyAtpAgentBuilder<T, S = MemorySessionStore>where
T: XrpcClient + Send + Sync,
S: AtpSessionStore + Send + Sync,
S::Error: Error + Send + Sync + 'static,{ /* private fields */ }Expand description
A builder for creating a BskyAgent.
Implementations§
Source§impl<T> BskyAtpAgentBuilder<T>
impl<T> BskyAtpAgentBuilder<T>
Source§impl<T, S> BskyAtpAgentBuilder<T, S>where
T: XrpcClient + Send + Sync,
S: AtpSessionStore + Send + Sync,
S::Error: Error + Send + Sync + 'static,
impl<T, S> BskyAtpAgentBuilder<T, S>where
T: XrpcClient + Send + Sync,
S: AtpSessionStore + Send + Sync,
S::Error: Error + Send + Sync + 'static,
Sourcepub fn store<S0>(self, store: S0) -> BskyAtpAgentBuilder<T, S0>
pub fn store<S0>(self, store: S0) -> BskyAtpAgentBuilder<T, S0>
Set the session store for the agent.
Returns a new builder with the session store set.
Sourcepub fn client<T0>(self, client: T0) -> BskyAtpAgentBuilder<T0, S>
pub fn client<T0>(self, client: T0) -> BskyAtpAgentBuilder<T0, S>
Set the XRPC client for the agent.
Returns a new builder with the XRPC client set.
pub async fn build(self) -> Result<BskyAgent<T, S>>
Trait Implementations§
Source§impl Default for BskyAtpAgentBuilder<ReqwestClient, MemorySessionStore>
Available on crate feature default-client only.
impl Default for BskyAtpAgentBuilder<ReqwestClient, MemorySessionStore>
Available on crate feature
default-client only.Source§fn default() -> Self
fn default() -> Self
Create a new builder with the default client and session store.
Default client is ReqwestClient and default session store is MemorySessionStore.
Auto Trait Implementations§
impl<T, S> Freeze for BskyAtpAgentBuilder<T, S>
impl<T, S> RefUnwindSafe for BskyAtpAgentBuilder<T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for BskyAtpAgentBuilder<T, S>
impl<T, S> Sync for BskyAtpAgentBuilder<T, S>
impl<T, S> Unpin for BskyAtpAgentBuilder<T, S>
impl<T, S> UnwindSafe for BskyAtpAgentBuilder<T, S>where
S: UnwindSafe,
T: UnwindSafe,
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