Compare commits
2 Commits
b40178ede2
...
efd44e16e2
Author | SHA1 | Date | |
---|---|---|---|
|
efd44e16e2 | ||
|
1aebef2c02 |
@ -4,8 +4,10 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[features]
|
||||
serde = ["dep:serde"]
|
||||
|
||||
[dependencies]
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
epoch = { git = "https://git.hitchhiker-linux.org/jeang3nie/epoch-rs.git", features = ["serde"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||
|
@ -1,10 +1,13 @@
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use {
|
||||
crate::error::Error,
|
||||
serde::{Deserialize, Serialize},
|
||||
std::{fmt, str},
|
||||
};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize, PartialEq, Eq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
|
||||
/// Represents the processor architecture the software is compiled for
|
||||
pub enum Arch {
|
||||
Any,
|
||||
|
@ -1,11 +1,14 @@
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use {
|
||||
crate::{error::Error, MAX_U12},
|
||||
epoch::DateTime,
|
||||
serde::{Deserialize, Serialize},
|
||||
std::{cmp, convert::Into, fmt, num::NonZeroU16, str},
|
||||
};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
|
||||
/// A specification for non-production releases
|
||||
pub enum PreRelease {
|
||||
Alpha(Option<NonZeroU16>),
|
||||
|
@ -1,10 +1,13 @@
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use {
|
||||
crate::{arch::Arch, error::Error, prerelease::PreRelease, MAX_U12},
|
||||
serde::{Deserialize, Serialize},
|
||||
std::{cmp, fmt, str},
|
||||
};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
|
||||
pub enum Kind {
|
||||
Simple {
|
||||
major: u16,
|
||||
@ -26,7 +29,8 @@ pub enum Kind {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
|
||||
pub struct Version {
|
||||
pub kind: Kind,
|
||||
pub pre: PreRelease,
|
||||
|
Loading…
Reference in New Issue
Block a user