AppFlowy/rust-lib/flowy-user/src/event.rs

22 lines
567 B
Rust
Raw Normal View History

use flowy_derive::{Flowy_Event, ProtoBuf_Enum};
2021-08-30 14:44:17 +00:00
use strum_macros::Display;
#[derive(Clone, Copy, PartialEq, Eq, Debug, Display, Hash, ProtoBuf_Enum, Flowy_Event)]
#[event_err = "UserError"]
pub enum UserEvent {
#[event(output = "UserDetail")]
GetStatus = 0,
2021-08-30 14:44:17 +00:00
#[event(input = "SignInRequest", output = "UserDetail")]
SignIn = 1,
2021-08-30 14:44:17 +00:00
#[event(input = "SignUpRequest", output = "UserDetail")]
SignUp = 2,
2021-08-30 14:44:17 +00:00
#[event(passthrough)]
SignOut = 3,
2021-08-30 14:44:17 +00:00
#[event(input = "UpdateUserRequest", output = "UserDetail")]
UpdateUser = 4,
}