ed_journals/modules/logs/content/log_event_content/
friends_event.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use serde::{Deserialize, Serialize};

/// Fired for events related to friends.
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct FriendsEvent {
    /// The name of the friend.
    name: String,

    /// The status of the event related to the friend.
    status: FriendsEventStatus,
}

/// The status of the event related to the friend.
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub enum FriendsEventStatus {
    /// The friend has gone offline.
    Offline,

    /// The friend has gone online.
    Online,

    /// Fired when the current player removes a friend from their friend list.
    Lost,

    /// The current player has sent a friend request to the given player.
    Requested,

    /// A friend was added to the current player's friend list.
    Added,

    /// Fired when a friend request was declined.
    Declined,
}