You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yuurei/src/state/mod.rs

23 lines
441 B

3 years ago
use super::*;
3 years ago
use std::collections::HashMap;
use generational_arena::{
Arena, Index as ArenaIndex,
};
use std::sync::Arc;
use tokio::sync::RwLock;
3 years ago
3 years ago
pub mod session;
3 years ago
pub mod user;
pub mod post;
pub mod body;
3 years ago
mod freeze; pub use freeze::*;
/// Entire post container
pub struct Oneesan
{
posts: RwLock<(Arena<Arc<RwLock<post::Post>>> // All posts
, HashMap<user::UserID, MaybeVec<ArenaIndex>> // Post lookup by user ID
)>,
}