ACTUALLY define the protocol

thanks maple for helping out
This commit is contained in:
red binder 2026-04-13 10:43:51 +02:00
commit 3a4eb78d2c
2 changed files with 6 additions and 16 deletions

View file

@ -5,24 +5,12 @@ use std::sync::{Weak};
use rnex_core::PID; use rnex_core::PID;
use rnex_core::nex::remote_console::RemoteConsole; use rnex_core::nex::remote_console::RemoteConsole;
use rnex_core::rmc::response::ErrorCode; use rnex_core::rmc::response::ErrorCode;
use rnex_core::rmc::protocols::secure::{Secure, RawSecure, RawSecureInfo, RemoteSecure};
use rnex_core::rmc::protocols::datastore::{GetMetaInfo, GetMetaParam}; use rnex_core::rmc::protocols::datastore::{GetMetaInfo, GetMetaParam};
use rnex_core::rmc::protocols::datastore::{DataStore, RawDataStore, RawDataStoreInfo, RemoteDataStore}; use rnex_core::rmc::protocols::datastore::{DataStore, RawDataStore, RawDataStoreInfo, RemoteDataStore};
use crate::nex::user::User;
define_rmc_proto!( impl DataStore for User {
proto DataStoreUser {
DataStore
}
);
#[rmc_struct(DataStoreUser)]
pub struct DataStoreUser {
pub pid: PID,
pub ip: PRUDPSockAddr,
pub this: Weak<DataStoreUser>,
pub remote: RemoteConsole,
}
impl DataStore for DataStoreUser {
async fn get_meta(&self, metaparam: GetMetaParam) -> Result<GetMetaInfo, ErrorCode> { async fn get_meta(&self, metaparam: GetMetaParam) -> Result<GetMetaInfo, ErrorCode> {
// // bogus // // bogus
// let info: GetMetaInfo = GetMetaInfo { // let info: GetMetaInfo = GetMetaInfo {

View file

@ -26,6 +26,7 @@ use rnex_core::rmc::protocols::matchmake_extension::{
}; };
use rnex_core::rmc::protocols::ranking::{Ranking, RawRanking, RawRankingInfo, RemoteRanking}; use rnex_core::rmc::protocols::ranking::{Ranking, RawRanking, RawRankingInfo, RemoteRanking};
use rnex_core::rmc::protocols::secure::{RawSecure, RawSecureInfo, RemoteSecure, Secure}; use rnex_core::rmc::protocols::secure::{RawSecure, RawSecureInfo, RemoteSecure, Secure};
use rnex_core::rmc::protocols::datastore::{DataStore, RawDataStore, RawDataStoreInfo, RemoteDataStore};
use rnex_core::rmc::response::ErrorCode; use rnex_core::rmc::response::ErrorCode;
use rnex_core::rmc::structures::any::Any; use rnex_core::rmc::structures::any::Any;
use rnex_core::rmc::structures::matchmake::{ use rnex_core::rmc::structures::matchmake::{
@ -51,7 +52,8 @@ define_rmc_proto!(
MatchmakeExt, MatchmakeExt,
Matchmake, Matchmake,
NatTraversal, NatTraversal,
Ranking Ranking,
DataStore
} }
); );