mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-04 06:50:23 +00:00
11 lines
352 B
Rust
11 lines
352 B
Rust
![]() |
use crate::FlowyError;
|
||
|
use bytes::Bytes;
|
||
|
use lib_dispatch::prelude::{AFPluginEventResponse, ResponseBuilder};
|
||
|
use std::convert::TryInto;
|
||
|
impl lib_dispatch::Error for FlowyError {
|
||
|
fn as_response(&self) -> AFPluginEventResponse {
|
||
|
let bytes: Bytes = self.clone().try_into().unwrap();
|
||
|
ResponseBuilder::Err().data(bytes).build()
|
||
|
}
|
||
|
}
|