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 {
2021-09-04 08:53:58 +00:00
#[event(output = "UserProfile")]
2021-08-31 15:01:46 +00:00
GetUserProfile = 0,
2021-08-30 14:44:17 +00:00
2021-09-04 08:53:58 +00:00
#[event(input = "SignInRequest", output = "UserProfile")]
2021-08-31 15:01:46 +00:00
SignIn = 1,
2021-08-30 14:44:17 +00:00
2021-09-04 08:53:58 +00:00
#[event(input = "SignUpRequest", output = "UserProfile")]
2021-08-31 15:01:46 +00:00
SignUp = 2,
2021-08-30 14:44:17 +00:00
#[event(passthrough)]
2021-08-31 15:01:46 +00:00
SignOut = 3,
2021-08-30 14:44:17 +00:00
2021-08-31 15:01:46 +00:00
#[event(input = "UpdateUserRequest")]
UpdateUser = 4,
}