MatiOS_SDK_Rust/syscalls/resources/
call_resource_method_v1.rs1use crate::syscalls::SyscallRequest;
2use crate::uuid::Uuid;
3use alloc::boxed::Box;
4use alloc::string::String;
5use alloc::vec::Vec;
6use crate::typedValue::TypedValue;
7pub struct CallResourceMethodV1 {
8 pub resource: Uuid,
9 pub method: String,
10 pub args: TypedValue,
11}
12
13impl CallResourceMethodV1 {
14 pub fn create(resource: Uuid, method: String, args: TypedValue) -> Box<SyscallRequest<Self>> {
15 Box::new(SyscallRequest {
16 size: size_of::<Self>(),
17 uuid: crate::uuid::Uuid::from_u128(0xbce7baa2_c3e2_4f7f_9d42_42c94065f5f0),
18 payload: Self {
19 resource,
20 method,
21 args,
22 },
23 })
24 }
25}