Added sample lib
This commit is contained in:
parent
5afca76aaa
commit
58d8516764
@ -3,6 +3,9 @@ name = "dev-dtos"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
chrono = { version = "0.4", features = [ "serde" ] }
|
2
src/dtos/mod.rs
Normal file
2
src/dtos/mod.rs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
pub mod shared;
|
||||||
|
pub mod sample;
|
1
src/dtos/sample/mod.rs
Normal file
1
src/dtos/sample/mod.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
pub mod sample;
|
8
src/dtos/sample/sample.rs
Normal file
8
src/dtos/sample/sample.rs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
pub struct SampleStruct{
|
||||||
|
pub sample_field: i32
|
||||||
|
}
|
||||||
|
impl SampleStruct {
|
||||||
|
pub fn new_sample() -> SampleStruct{
|
||||||
|
SampleStruct { sample_field: -1 }
|
||||||
|
}
|
||||||
|
}
|
0
src/dtos/shared/mod.rs
Normal file
0
src/dtos/shared/mod.rs
Normal file
3
src/lib.rs
Normal file
3
src/lib.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#[forbid(unsafe_code)]
|
||||||
|
|
||||||
|
pub mod dtos;
|
@ -1,3 +0,0 @@
|
|||||||
fn main() {
|
|
||||||
println!("Hello, world!");
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user