Skip to content

Commit

Permalink
Merge pull request #136 from meanbeanmachine/fix-callback-derives
Browse files Browse the repository at this point in the history
add clone and debug to more callbacks
  • Loading branch information
Noxime authored Nov 28, 2023
2 parents a4dfe2a + a42884b commit c136535
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ pub struct AuthTicket(pub(crate) sys::HAuthTicket);
/// Called when generating a authentication session ticket.
///
/// This can be used to verify the ticket was created successfully.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct AuthSessionTicketResponse {
/// The ticket in question
pub ticket: AuthTicket,
Expand Down Expand Up @@ -299,7 +299,7 @@ unsafe impl Callback for TicketForWebApiResponse {

/// Called when an authentication ticket has been
/// validated.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct ValidateAuthTicketResponse {
/// The steam id of the entity that provided the ticket
pub steam_id: SteamId,
Expand Down Expand Up @@ -435,7 +435,7 @@ unsafe impl Callback for SteamServerConnectFailure {
}

/// Errors from `ValidateAuthTicketResponse`
#[derive(Debug, Error)]
#[derive(Clone, Debug, Error)]
pub enum AuthSessionValidateError {
/// The user in question is not connected to steam
#[error("user not connected to steam")]
Expand Down
6 changes: 3 additions & 3 deletions src/user_stats/stat_callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use super::*;
/// }
/// });
/// ```
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct UserStatsReceived {
pub steam_id: SteamId,
pub game_id: GameId,
Expand Down Expand Up @@ -51,7 +51,7 @@ unsafe impl Callback for UserStatsReceived {
/// }
/// });
/// ```
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct UserStatsStored {
pub game_id: GameId,
pub result: Result<(), SteamError>,
Expand Down Expand Up @@ -86,7 +86,7 @@ unsafe impl Callback for UserStatsStored {
/// // ...
/// });
/// ```
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct UserAchievementStored {
pub game_id: GameId,
pub achievement_name: String,
Expand Down
2 changes: 2 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub struct Utils<Manager> {
pub(crate) _inner: Arc<Inner<Manager>>,
}

#[derive(Clone, Debug)]
pub struct GamepadTextInputDismissed {
pub submitted_text_len: Option<u32>,
}
Expand All @@ -28,6 +29,7 @@ unsafe impl Callback for GamepadTextInputDismissed {
}
}

#[derive(Clone, Debug)]
pub struct FloatingGamepadTextInputDismissed;

unsafe impl Callback for FloatingGamepadTextInputDismissed {
Expand Down

0 comments on commit c136535

Please sign in to comment.