mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-05 06:28:20 -04:00
bindings: Use proc-macros for types no longer referenced in UDL
This commit is contained in:
committed by
Jonas Platte
parent
34d2a20b15
commit
b4faef7867
@@ -42,7 +42,8 @@ pub enum SignatureError {
|
||||
UnknownUserIdentity(String),
|
||||
}
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
#[derive(Debug, thiserror::Error, uniffi::Error)]
|
||||
#[uniffi(flat_error)]
|
||||
pub enum CryptoStoreError {
|
||||
#[error("Failed to open the store")]
|
||||
OpenStore(#[from] OpenStoreError),
|
||||
|
||||
@@ -8,16 +8,6 @@ callback interface ProgressListener {
|
||||
void on_progress(i32 progress, i32 total);
|
||||
};
|
||||
|
||||
[Error]
|
||||
enum CryptoStoreError {
|
||||
"OpenStore",
|
||||
"CryptoStore",
|
||||
"OlmError",
|
||||
"Serialization",
|
||||
"InvalidUserId",
|
||||
"Identifier",
|
||||
};
|
||||
|
||||
dictionary CancelInfo {
|
||||
string cancel_code;
|
||||
string reason;
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
namespace matrix_sdk_ffi {};
|
||||
|
||||
[Error]
|
||||
interface ClientError {
|
||||
Generic(string msg);
|
||||
};
|
||||
|
||||
callback interface ClientDelegate {
|
||||
void did_receive_auth_error(boolean is_soft_logout);
|
||||
};
|
||||
@@ -166,11 +161,3 @@ callback interface SessionVerificationControllerDelegate {
|
||||
void did_cancel();
|
||||
void did_finish();
|
||||
};
|
||||
|
||||
enum LogLevel {
|
||||
"Error",
|
||||
"Warn",
|
||||
"Info",
|
||||
"Debug",
|
||||
"Trace",
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use matrix_sdk::{self, encryption::CryptoStoreError, HttpError, IdParseError, StoreError};
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
#[derive(Debug, thiserror::Error, uniffi::Error)]
|
||||
pub enum ClientError {
|
||||
#[error("client error: {msg}")]
|
||||
Generic { msg: String },
|
||||
|
||||
@@ -170,6 +170,7 @@ impl Span {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(uniffi::Enum)]
|
||||
pub enum LogLevel {
|
||||
Error,
|
||||
Warn,
|
||||
|
||||
Reference in New Issue
Block a user