Skip to content

Commit bc7e366

Browse files
committed
Initiated a new sample
1 parent de360a1 commit bc7e366

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[workspace]
2-
members = ["Lesson_00", "Lesson_01", "Lesson_02", "Lesson_03", "Lesson_04", "Lesson_05", "Lesson_06", "Lesson_07", "Lesson_08", "Lesson_09", "Lesson_10", "Lesson_11", "collector", "drone-lab", "fops", "mocking", "sysco", "sysco2"]
2+
members = ["Lesson_00", "Lesson_01", "Lesson_02", "Lesson_03", "Lesson_04", "Lesson_05", "Lesson_06", "Lesson_07", "Lesson_08", "Lesson_09", "Lesson_10", "Lesson_11", "collector", "drone-lab", "fops", "mocking", "router", "sysco", "sysco2"]
33

44
resolver = "2"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,4 @@ Rust dilinde **isimlendirme standartları _(Naming Conventions)_** da kod okunur
7070
- collector; sysinfo küfesini kullanarak cpu, memory metrikleri toplayan uygulama.
7171
- drone-lab; Konu tekrarı, birim testler, lifetimes kullanımları.
7272
- fops; Temel I/O işlemleri.
73+
- router; trait kullanımını örneklemek için eklenmiş olan uygulama.

router/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "router"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
anyhow = "1.0.98"

router/src/main.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
fn main() {
2+
3+
}
4+
5+
pub struct Request<'a> {
6+
pub path:&'a str,
7+
pub data:Vec<u8>
8+
}
9+
10+
pub trait RouteHandler{
11+
fn handle(&self,request:&Request) -> anyhow::Result<()>;
12+
}

0 commit comments

Comments
 (0)