Split into libs
This commit is contained in:
7
sigma/Cargo.toml
Normal file
7
sigma/Cargo.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
[package]
|
||||
name = "sigma"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.217", features = ["derive"] }
|
||||
4
sigma/src/error.rs
Normal file
4
sigma/src/error.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
pub enum Error {
|
||||
TcpBindFailed = 1,
|
||||
AxumAppExited = 2,
|
||||
}
|
||||
2
sigma/src/lib.rs
Normal file
2
sigma/src/lib.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
pub mod error;
|
||||
pub mod repsonse;
|
||||
15
sigma/src/repsonse.rs
Normal file
15
sigma/src/repsonse.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct SigmaInformation {
|
||||
name: String,
|
||||
version: String,
|
||||
}
|
||||
impl SigmaInformation {
|
||||
pub fn new(name: &str, version: &str) -> Self {
|
||||
Self {
|
||||
version: version.into(),
|
||||
name: name.into()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user