This patch is simply meant to mark the beginning of the newest phase for the tui build. I've 100% settled on using termion as the backend and marking what is done so far Renderer side: Termion has a similar issue where moving data happens very quietly so its best if the two (renderer and cache) have the their data to use as they please Cache Side: Basically we own the data we're using because we constantly have to mutate data ourselves Config in the middle: Mutable but only from the rendering side because the cache is completely transient It technically to own its data but it does anyway because the render(backend) likes to consume data like there's no tomorrow
		
			
				
	
	
		
			33 lines
		
	
	
		
			565 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			565 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
use serde::{Serialize, Deserialize};
 | 
						|
 | 
						|
#[allow(dead_code)]
 | 
						|
const VOICE_CHANNEL: i32 = 1;
 | 
						|
#[allow(dead_code)]
 | 
						|
const TEXT_CHANNEL: i32 = 2;
 | 
						|
 | 
						|
// Network Types
 | 
						|
#[allow(dead_code)]
 | 
						|
pub struct Message {
 | 
						|
    pub id: u64,
 | 
						|
    pub time: i64,
 | 
						|
    pub content: String,
 | 
						|
    pub content_type: String,
 | 
						|
    pub channel_id: u64,
 | 
						|
    pub userid: u64,
 | 
						|
    pub username: String,
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
#[allow(dead_code)]
 | 
						|
pub struct Channel {
 | 
						|
    pub name: String,
 | 
						|
    pub id: u64,
 | 
						|
    pub type_: i32,
 | 
						|
    pub description: Option<String>,
 | 
						|
}
 | 
						|
 | 
						|
#[derive(Deserialize)]
 | 
						|
pub struct Jwt {
 | 
						|
    pub jwt: String
 | 
						|
}
 |