-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement
OnEvent
trait for all events
- Loading branch information
Showing
21 changed files
with
162 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
#[derive(Debug, Default)] | ||
pub struct ClearActivityEvent; | ||
|
||
use crate::messages::events::event::{EventContext, OnEvent}; | ||
|
||
impl ClearActivityEvent { | ||
pub fn on_clear_activity(self) {} | ||
} | ||
|
||
impl OnEvent for ClearActivityEvent { | ||
fn on_event(self, _ctx: &EventContext) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
#[derive(Debug, Default)] | ||
pub struct ConnectEvent; | ||
|
||
use crate::messages::events::event::{EventContext, OnEvent}; | ||
|
||
impl ConnectEvent { | ||
pub fn on_connect(self) {} | ||
} | ||
|
||
impl OnEvent for ConnectEvent { | ||
fn on_event(self, _ctx: &EventContext) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
#[derive(Debug, Default)] | ||
pub struct DisconnectEvent; | ||
|
||
use crate::messages::events::event::{EventContext, OnEvent}; | ||
|
||
impl DisconnectEvent { | ||
pub fn on_disconnect(self) {} | ||
} | ||
|
||
impl OnEvent for DisconnectEvent { | ||
fn on_event(self, _ctx: &EventContext) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
use crate::messages::events::event::{EventContext, OnEvent}; | ||
|
||
#[derive(Debug, Default)] | ||
pub struct ResetTimestampEvent; | ||
|
||
impl ResetTimestampEvent { | ||
pub fn on_reset_timestamp(self) {} | ||
impl OnEvent for ResetTimestampEvent { | ||
fn on_event(self, _ctx: &EventContext) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
use crate::messages::events::event::{EventContext, OnEvent}; | ||
|
||
#[derive(Debug, Default)] | ||
pub struct ClientDisconnectedEvent; | ||
|
||
impl ClientDisconnectedEvent { | ||
pub fn on_client_disconnected(self) {} | ||
impl OnEvent for ClientDisconnectedEvent { | ||
fn on_event(self, _ctx: &EventContext) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.