mirror of https://github.com/Revertron/Alfis
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
600 B
Rust
36 lines
600 B
Rust
4 years ago
|
/// Represents a result of block check on block's arrival
|
||
|
#[derive(PartialEq)]
|
||
|
pub enum BlockQuality {
|
||
|
Good,
|
||
|
Twin,
|
||
|
Future,
|
||
|
Bad,
|
||
|
Fork,
|
||
|
}
|
||
|
|
||
|
#[derive(Debug)]
|
||
|
pub enum MineResult {
|
||
|
Fine,
|
||
|
WrongName,
|
||
|
WrongData,
|
||
|
WrongKey,
|
||
|
WrongZone,
|
||
|
NotOwned,
|
||
|
Cooldown { time: i64 },
|
||
|
}
|
||
|
|
||
|
#[derive(Debug)]
|
||
|
pub struct Options {
|
||
|
pub origin: String,
|
||
|
pub version: u32,
|
||
|
}
|
||
|
|
||
|
impl Options {
|
||
|
pub fn new(origin: String, version: u32) -> Self {
|
||
|
Options { origin, version }
|
||
|
}
|
||
|
|
||
|
pub fn empty() -> Self {
|
||
|
Options { origin: String::new(), version: 0 }
|
||
|
}
|
||
|
}
|