Nathan.fooo ab5a3dae3c
chore: upgrade rust version to 1.70 (#2749)
* chore: upgrade rust version to 1.70

* ci: fix wanrings

* ci: fix clippy warings
2023-06-09 22:23:07 +08:00

23 lines
556 B
Rust

use flowy_derive::ProtoBuf_Enum;
use flowy_notification::NotificationBuilder;
const OBSERVABLE_CATEGORY: &str = "Document";
#[derive(ProtoBuf_Enum, Debug, Default)]
pub(crate) enum DocumentNotification {
#[default]
Unknown = 0,
DidReceiveUpdate = 1,
}
impl std::convert::From<DocumentNotification> for i32 {
fn from(notification: DocumentNotification) -> Self {
notification as i32
}
}
pub(crate) fn send_notification(id: &str, ty: DocumentNotification) -> NotificationBuilder {
NotificationBuilder::new(id, ty, OBSERVABLE_CATEGORY)
}