#[getset(get = "pub")]
//! Participation types.
+#![allow(missing_docs)]
+
/// Participation data.
pub mod participation;
@@ -37,6 +39,7 @@ pub struct Event {
/// Information about a voting or staking event.
#[derive(Debug, Clone, Serialize, Deserialize, Getters)]
#[serde(rename_all = "camelCase")]
+#[getset(get = "pub")]
pub struct EventData {
name: String,
milestone_index_commence: u32,
@@ -59,6 +62,7 @@ pub enum EventPayload {
/// Payload for a staking event.
#[derive(Debug, Clone, Serialize, Deserialize, Getters)]
#[serde(rename_all = "camelCase")]
+#[getset(get = "pub")]
pub struct StakingEventPayload {
#[serde(rename = "type")]
kind: u32,
@@ -73,6 +77,7 @@ pub struct StakingEventPayload {
/// Payload for a voting event.
#[derive(Debug, Clone, Serialize, Deserialize, Getters)]
#[serde(rename_all = "camelCase")]
+#[getset(get = "pub")]
pub struct VotingEventPayload {
#[serde(rename = "type")]
kind: u32,
@@ -82,6 +87,7 @@ pub struct VotingEventPayload {
/// Question for a voting event.
#[derive(Debug, Clone, Serialize, Deserialize, Getters)]
#[serde(rename_all = "camelCase")]
+#[getset(get = "pub")]
pub struct Question {
text: String,
answers: Vec<Answer>,
@@ -91,6 +97,7 @@ pub struct Question {
/// Answer in a voting event.
#[derive(Debug, Clone, Serialize, Deserialize, Getters)]
#[serde(rename_all = "camelCase")]
+#[getset(get = "pub")]
pub struct Answer {
value: u8,
text: String,
@@ -101,6 +108,7 @@ pub struct Answer {
/// Event status.
#[derive(Debug, Clone, Serialize, Deserialize, Getters)]
#[serde(rename_all = "camelCase")]
+#[getset(get = "pub")]
pub struct EventStatus {
milestone_index: u32,
status: String,
@@ -110,12 +118,14 @@ pub struct EventStatus {
/// Answers.
#[derive(Debug, Clone, Serialize, Deserialize, Getters)]
+#[getset(get = "pub")]
pub struct Answers {
answers: Vec<AnswerStatus>,
}
/// Answer status.
#[derive(Debug, Clone, Serialize, Deserialize, Getters)]
+#[getset(get = "pub")]
pub struct AnswerStatus {
value: u8,
current: u64,
