Skip to main content

thruput_xdr/
invoke_args.rs

1// -*-Rust-*-
2// Generated Code: DO NOT CHECK IN
3
4// Generated from xdrc commit: 6ab835b07c234abb4b0b50b61d687904727a4f32
5
6#![allow(non_camel_case_types)]
7#![allow(non_snake_case)]
8#![allow(non_upper_case_globals)]
9#![allow(unused_imports)]
10#![allow(dead_code)]
11#![allow(unused_variables)]
12#![allow(clippy::unnecessary_cast)]
13
14use crate::*;
15use core::option::Option;
16use core::ops::{Deref, DerefMut};
17
18#[cfg(feature = "std")]
19use std::io::{Read, Write};
20#[cfg(feature = "xdrs")]
21use xdrs::*;
22
23
24#[cfg(feature = "serde")]
25use ::serde::{{Serialize, Deserialize}};
26
27
28
29#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30#[cfg_attr(feature = "xdrs", derive(ReadXDR, WriteXDR, ConstXDRSize))]
31#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
32#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
33#[repr(C)]
34pub struct CopyableInvokeInputs {
35    pub entrypoint_id: u64,
36    pub gas_limit: GasAmount,
37    pub flags: InvokeFlagSet,
38    // Explicit tail padding so the aggregate has no implementation-defined
39    // padding bytes. The RV32 syscall ABI decodes this struct by range-checking
40    // and copying sizeof() bytes of guest memory, which is only a
41    // host-layout-independent decode when every byte is a named field. Naming
42    // the tail keeps std::has_unique_object_representations_v true, which the
43    // host's by-reference syscall input path static_asserts. Ignored by the
44    // host; not part of the invoke semantics.
45    pub reserved: u32,
46}
47
48#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
49#[cfg_attr(feature = "xdrs", derive(ReadXDR, WriteXDR, ConstXDRSize))]
50#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
51#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
52#[repr(C)]
53pub struct CopyableInvokeOutputs {
54    pub return_buffer_len: RuntimeMemoryLength,
55    // The number of auth tokens the child returned. GetReturnedBuffer reports
56    // which of the current frame's ids they took.
57    pub returned_auth_token_count: u32,
58    // The outcome of the child frame. Only meaningful when the Invoke syscall
59    // returns kSyscallErrorCodeNone (i.e. a child frame actually ran):
60    //   Return -> child returned normally; return_buffer_len bytes available
61    //   Abort  -> child manually reverted; abort buffer available
62    //   Fault  -> child trapped / ran out of gas; no return buffer
63    // Left untouched when the syscall returns a nonzero error code (the call
64    // was rejected before any child frame ran, and is a complete no-op).
65    pub frame_status: InvocationFrameStatusCode,
66}
67
68
69//
70// XDR internals below this point
71//
72
73