Skip to content

Commit

Permalink
add derives to TickPolicy and ServerEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
UkoeHB committed May 28, 2024
1 parent 6d7a82e commit febf440
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added `Debug`/`Clone` derives to `ServerEvent`.
- Added `Debug`/`Copy`/`Clone` derives to `TickPolicy`.

## [0.26.1] - 2024-05-27

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ pub enum ServerSet {
///
/// Note that component updates are replicated over the unreliable channel, so if a component update packet is lost
/// then component updates won't be resent until the server's replication system runs again.
#[derive(Debug, Copy, Clone)]
pub enum TickPolicy {
/// The replicon tick is incremented at most max ticks per second. In practice the tick rate may be lower if the
/// app's update cycle duration is too long.
Expand Down Expand Up @@ -600,7 +601,7 @@ pub enum VisibilityPolicy {
/// Connection and disconnection events on the server.
///
/// The messaging backend is responsible for emitting these in [`ServerSet::SendEvents`].
#[derive(Event)]
#[derive(Event, Debug, Clone)]
pub enum ServerEvent {
ClientConnected { client_id: ClientId },
ClientDisconnected { client_id: ClientId, reason: String },
Expand Down

0 comments on commit febf440

Please sign in to comment.