First commit of 0.5.* branch.

This commit is contained in:
Revertron
2021-05-02 12:55:51 +02:00
parent 8bb2d9af9f
commit 9949d13e62
19 changed files with 202 additions and 422 deletions
+16 -1
View File
@@ -1,3 +1,6 @@
use std::fmt::{Display, Formatter};
use serde::{Deserialize, Serialize};
/// Represents a result of block check on block's arrival
#[derive(PartialEq)]
pub enum BlockQuality {
@@ -34,4 +37,16 @@ impl Options {
pub fn empty() -> Self {
Options { origin: String::new(), version: 0 }
}
}
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct ZoneData {
pub name: String,
pub yggdrasil: bool,
}
impl Display for ZoneData {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
f.write_str(&format!("{}, yggdrasil: {}", self.name, self.yggdrasil))
}
}