Private
Public Access
1
0

Initial commit

This commit is contained in:
2024-04-20 18:17:55 -07:00
commit 0b2811dc9f
6 changed files with 54 additions and 0 deletions

8
kordophone/Cargo.toml Normal file
View File

@@ -0,0 +1,8 @@
[package]
name = "kordophone"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

12
kordophone/src/api/mod.rs Normal file
View File

@@ -0,0 +1,12 @@
pub trait APIInterface {
fn version(&self) -> String;
}
pub struct TestClient {}
impl APIInterface for TestClient {
fn version(&self) -> String {
return "KordophoneTest-1.0".to_string()
}
}

16
kordophone/src/lib.rs Normal file
View File

@@ -0,0 +1,16 @@
mod api;
pub use self::api::TestClient;
pub use self::api::APIInterface;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_version() {
let client = TestClient{};
let version = client.version();
assert_eq!(version, "KordophoneTest-1.0");
}
}