mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-03 22:41:08 +00:00

* chore: async load user profile * chore: enable reset workspace * chore: add confirm dialog
15 lines
344 B
Rust
15 lines
344 B
Rust
use std::convert::TryInto;
|
|
|
|
use bytes::Bytes;
|
|
|
|
use lib_dispatch::prelude::{AFPluginEventResponse, ResponseBuilder};
|
|
|
|
use crate::FlowyError;
|
|
|
|
impl lib_dispatch::Error for FlowyError {
|
|
fn as_response(&self) -> AFPluginEventResponse {
|
|
let bytes: Bytes = self.clone().try_into().unwrap();
|
|
ResponseBuilder::Err().data(bytes).build()
|
|
}
|
|
}
|