Struct UiaaInfo
#[non_exhaustive]pub struct UiaaInfo {
pub flows: Vec<AuthFlow>,
pub completed: Vec<AuthType>,
pub params: Option<Box<RawValue>>,
pub session: Option<String>,
pub auth_error: Option<StandardErrorBody>,
}api and (crate features client or server) only.Expand description
Information about available authentication flows and status for User-Interactive Authenticiation API.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.flows: Vec<AuthFlow>List of authentication flows available for this endpoint.
completed: Vec<AuthType>List of stages in the current flow completed by the client.
params: Option<Box<RawValue>>Authentication parameters required for the client to complete authentication.
To create a Box<RawJsonValue>, use serde_json::value::to_raw_value.
session: Option<String>Session key for client to use to complete authentication.
auth_error: Option<StandardErrorBody>Authentication-related errors for previous request returned by homeserver.
Implementations§
§impl UiaaInfo
impl UiaaInfo
pub fn params<'a, T>(&'a self, auth_type: &AuthType) -> Result<Option<T>, Error>where
T: Deserialize<'a>,
pub fn params<'a, T>(&'a self, auth_type: &AuthType) -> Result<Option<T>, Error>where
T: Deserialize<'a>,
Get the parameters for the given AuthType, if they are available in the params object.
Returns Ok(Some(_)) if the parameters for the authentication type were found and the
deserialization worked, Ok(None) if the parameters for the authentication type were not
found, and Err(_) if the parameters for the authentication type were found but their
deserialization failed.
§Example
use ruma_client_api::uiaa::{AuthType, LoginTermsParams};
let login_terms_params = uiaa_info.params::<LoginTermsParams>(&AuthType::Terms)?;Trait Implementations§
§impl<'de> Deserialize<'de> for UiaaInfo
impl<'de> Deserialize<'de> for UiaaInfo
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UiaaInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UiaaInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for UiaaInfo
impl Serialize for UiaaInfo
§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,
Auto Trait Implementations§
impl Freeze for UiaaInfo
impl RefUnwindSafe for UiaaInfo
impl Send for UiaaInfo
impl Sync for UiaaInfo
impl Unpin for UiaaInfo
impl UnsafeUnpin for UiaaInfo
impl UnwindSafe for UiaaInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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§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