Skip to main content

alkahest_session/
lib.rs

1//! # Alkahest-session
2//! 
3#![cfg_attr(not(test), no_std)]
4
5/// The state of a session.
6pub enum SessionState {
7    ///
8    Validating,
9    ///
10    Compiling,
11    ///
12    Linking,
13    ///
14    Ready,
15    ///
16    Failed,
17}
18
19pub struct Session {
20    pub module_id: u32,
21    state: SessionState,
22}
23
24impl Session {
25    pub fn new(module_id: u32) -> Self {
26        Self {
27            module_id,
28            state: SessionState::Validating,
29        }
30    }
31}
32
33
34#[cfg(test)]
35mod tests {
36    use super::*;
37
38    #[test]
39    pub fn new_session() {
40        let _ = Session::new(123);       
41    }
42}