pub struct MockClientBuilder { /* private fields */ }
Available on crate feature
testing
only.Expand description
An augmented ClientBuilder
that also allows for handling session login.
Implementations§
Source§impl MockClientBuilder
impl MockClientBuilder
Sourcepub fn unlogged(self) -> Self
pub fn unlogged(self) -> Self
Doesn’t log-in a user.
Authenticated requests will fail if this is called.
Sourcepub fn registered_with_oauth(self, issuer: impl Into<String>) -> Self
pub fn registered_with_oauth(self, issuer: impl Into<String>) -> Self
The client is registered with the OAuth 2.0 API.
Sourcepub fn logged_in_with_oauth(self, issuer: impl Into<String>) -> Self
pub fn logged_in_with_oauth(self, issuer: impl Into<String>) -> Self
The user is already logged in with the OAuth 2.0 API.
Sourcepub fn store_config(self, store_config: StoreConfig) -> Self
pub fn store_config(self, store_config: StoreConfig) -> Self
Provides another StoreConfig
for the underlying ClientBuilder
.
Sourcepub fn sqlite_store(self, path: impl AsRef<Path>) -> Self
Available on crate feature sqlite
only.
pub fn sqlite_store(self, path: impl AsRef<Path>) -> Self
sqlite
only.Use an SQLite store at the given path for the underlying
ClientBuilder
.
Sourcepub fn handle_refresh_tokens(self) -> Self
pub fn handle_refresh_tokens(self) -> Self
Handle refreshing access tokens automatically.
Auto Trait Implementations§
impl Freeze for MockClientBuilder
impl !RefUnwindSafe for MockClientBuilder
impl Send for MockClientBuilder
impl Sync for MockClientBuilder
impl Unpin for MockClientBuilder
impl !UnwindSafe for MockClientBuilder
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more