server/rwhod: varlink shenanigans
Some checks failed
Build and test / check (push) Failing after 1m19s
Build and test / build (push) Successful in 1m24s
Build and test / test (push) Successful in 2m47s
Build and test / docs (push) Successful in 3m2s

This commit is contained in:
2026-01-05 16:48:06 +09:00
parent 4f78b1ed1e
commit 0defac7a9f
6 changed files with 448 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
use std::array;
use serde::{Deserialize, Serialize};
use bytes::{Buf, BufMut, BytesMut};
use chrono::{DateTime, Duration, Utc};
@@ -239,7 +240,7 @@ pub type LoadAverage = (i32, i32, i32);
///
/// This struct is intended for easier use in Rust code, with proper types and dynamic arrays.
/// It can be converted to and from the low-level [`Whod`] struct used for network transmission.
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct WhodStatusUpdate {
// NOTE: there is only one defined packet type, so we just omit it here
/// Timestamp by sender
@@ -285,7 +286,7 @@ impl WhodStatusUpdate {
///
/// This struct is intended for easier use in Rust code, with proper types.
/// It can be converted to and from the low-level [`Whoent`] struct used for network transmission.
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct WhodUserEntry {
/// TTY name (max 8 characters)
pub tty: String,