Hi all, I'm a little bit confused about how the module system works. I have a relatively default Tauri 2.0 project. In the src-tauri/src dir I have:
src
├── config.rs
├── lib.rs
├── main.rs
└── page_sources
├── mock_serial.rs
└── mod.rs
In my lib.rs, I have a public struct:
#[derive(Default)]
pub struct CurrentPages {
pub pages: Vec<Page>,
}
In my config.rs, I have another public struct:
use serde::{Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize, Debug)]
pub struct Config {
pub blahblahblah: String,
}
In my mod.rs:
pub mod mock_serial;
use serde::Serialize;
use std::time::SystemTime;
pub use crate::page_sources::mock_serial::*;
pub trait PageProvider {
fn start(&self, app_handle: tauri::AppHandle) -> ();
}
#[derive(Clone, Serialize)]
pub struct Page {
pub blahblahblah: String,
}