You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
436 B
Rust

use crate::api::items::Items;
use crate::models::version::Version;
use std::sync::Arc;
#[cfg(test)]
mod tests;
pub mod items;
pub mod versions;
pub struct Api {
version: Arc<Version>,
items: Items,
}
impl Api {
pub fn new(version: Version) -> Self {
let version = Arc::new(version);
Self {
version: Arc::clone(&version),
items: Items::new(Arc::clone(&version)),
}
}
}