Enum matrix_sdk::ruma::api::client::session::get_login_types::v3::LoginType
#[non_exhaustive]pub enum LoginType {
Password(PasswordLoginType),
Token(TokenLoginType),
Sso(SsoLoginType),
ApplicationService(ApplicationServiceLoginType),
}
Available on crate feature
api
and (crate features client
or server
) only.Expand description
An authentication mechanism.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Password(PasswordLoginType)
A password is supplied to authenticate.
Token(TokenLoginType)
Token-based login.
Sso(SsoLoginType)
SSO-based login.
ApplicationService(ApplicationServiceLoginType)
Application Service login.
Implementations§
§impl LoginType
impl LoginType
pub fn new(
login_type: &str,
data: Map<String, Value>
) -> Result<LoginType, Error>
pub fn new( login_type: &str, data: Map<String, Value> ) -> Result<LoginType, Error>
Creates a new LoginType
with the given login_type
string and data.
Prefer to use the public variants of LoginType
where possible; this constructor is
meant be used for unsupported login types only and does not allow setting
arbitrary data for supported ones.
pub fn login_type(&self) -> &str
pub fn login_type(&self) -> &str
Returns a reference to the login_type
string.
Trait Implementations§
§impl<'de> Deserialize<'de> for LoginType
impl<'de> Deserialize<'de> for LoginType
§fn deserialize<D>(
deserializer: D
) -> Result<LoginType, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<LoginType, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for LoginType
impl Serialize for LoginType
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for LoginType
impl Send for LoginType
impl Sync for LoginType
impl Unpin for LoginType
impl UnwindSafe for LoginType
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§fn clone_handle(handle: Handle) -> Handle
fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>