matrix_sdk_ffi/
element.rs1use serde::Deserialize;
2
3use crate::ClientError;
4
5#[derive(Deserialize, uniffi::Record)]
7pub struct ElementCallWellKnown {
8 widget_url: String,
9}
10
11#[derive(Deserialize, uniffi::Record)]
13pub struct ElementWellKnown {
14 call: Option<ElementCallWellKnown>,
15 registration_helper_url: Option<String>,
16}
17
18#[matrix_sdk_ffi_macros::export]
20pub fn make_element_well_known(string: String) -> Result<ElementWellKnown, ClientError> {
21 serde_json::from_str(&string).map_err(ClientError::new)
22}