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

use super::*;
use std::collections::HashMap;
use generational_arena::{
Arena, Index as ArenaIndex,
};
use std::sync::Arc;
use tokio::sync::RwLock;
pub mod session;
pub mod user;
pub mod post;
pub mod body;
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
)>,
}