Struct matrix_sdk::matrix_auth::LoginBuilder
source · pub struct LoginBuilder { /* private fields */ }
Expand description
Builder type used to configure optional settings for logging in with a username or token.
Created with MatrixAuth::login_username
or MatrixAuth::login_token
.
Finalized with .send()
.
Implementations§
source§impl LoginBuilder
impl LoginBuilder
sourcepub fn device_id(self, value: &str) -> Self
pub fn device_id(self, value: &str) -> Self
Set the device ID.
The device ID is a unique ID that will be associated with this session. If not set, the homeserver will create one. Can be an existing device ID from a previous login call. Note that this should be done only if the client also holds the corresponding encryption keys.
sourcepub fn initial_device_display_name(self, value: &str) -> Self
pub fn initial_device_display_name(self, value: &str) -> Self
Set the initial device display name.
The device display name is the public name that will be associated with the device ID. Only necessary the first time you log in with this device ID. It can be changed later.
sourcepub fn request_refresh_token(self) -> Self
pub fn request_refresh_token(self) -> Self
Advertise support for refreshing access tokens.
By default, the Client
won’t handle refreshing access tokens, so
Client::refresh_access_token()
or
MatrixAuth::refresh_access_token()
needs to be called manually.
This behavior can be changed by calling
handle_refresh_tokens()
when building the Client
.
Note that refreshing access tokens might not be supported or might be enforced by the homeserver regardless of this setting.
Trait Implementations§
source§impl IntoFuture for LoginBuilder
impl IntoFuture for LoginBuilder
§type IntoFuture = Pin<Box<dyn Future<Output = <LoginBuilder as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <LoginBuilder as IntoFuture>::Output> + Send>>
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations§
impl Freeze for LoginBuilder
impl !RefUnwindSafe for LoginBuilder
impl Send for LoginBuilder
impl Sync for LoginBuilder
impl Unpin for LoginBuilder
impl !UnwindSafe for LoginBuilder
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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>
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