Some checks failed
Build and Test / super-mario-maker (push) Failing after 10m30s
Build and Test / fast-racing-neo (push) Failing after 11m40s
Build and Test / friends (push) Failing after 11m56s
Build and Test / wii-sports-club (push) Failing after 12m9s
Build and Test / splatoon (push) Failing after 12m14s
Build and Test / puyopuyo (push) Failing after 12m23s
Build and Test / wii-u-chat (push) Failing after 12m23s
Build and Test / mario-tennis (push) Failing after 12m23s
Build and Test / sonic-transformed (push) Failing after 12m23s
Build and Test / splatoon-testfire (push) Failing after 12m30s
Build and Test / minecraft-wiiu (push) Failing after 12m37s
31 lines
732 B
Rust
31 lines
732 B
Rust
#![allow(async_fn_in_trait)]
|
|
|
|
use rnex_rmc::{RmcSerialize, define_rmc_proto};
|
|
pub mod secure;
|
|
pub mod util;
|
|
use secure::{RawSecure, RawSecureInfo, RemoteSecure, Secure};
|
|
use util::{RawUtility, RawUtilityInfo, RemoteUtility, Utility};
|
|
|
|
#[derive(RmcSerialize, Debug, Default, Clone)]
|
|
#[rmc_struct(0)]
|
|
pub struct ResultsRange {
|
|
pub offset: u32,
|
|
pub size: u32,
|
|
}
|
|
|
|
impl ResultsRange {
|
|
pub fn make_from_list<T: Clone>(&self, list: &[T]) -> Vec<T> {
|
|
let end = usize::max(list.len(), self.offset as usize + self.size as usize);
|
|
|
|
list.get(self.offset as usize..end)
|
|
.unwrap_or_default()
|
|
.into()
|
|
}
|
|
}
|
|
|
|
define_rmc_proto!(
|
|
proto BaseProtocol{
|
|
Secure,
|
|
Utility,
|
|
}
|
|
);
|