#[repr(transparent)]pub struct SyscallErrorCode(pub i32);Expand description
Error codes returned by system calls. Each syscall can return a specific subset of these error codes. Check the syscalls.yaml documentation for which errors each syscall can return.
Tuple Fields§
§0: i32Implementations§
Source§impl SyscallErrorCode
impl SyscallErrorCode
Sourcepub const kSyscallErrorCodeNone: Self
pub const kSyscallErrorCodeNone: Self
No error
Sourcepub const kSyscallErrorCodeFault: Self
pub const kSyscallErrorCodeFault: Self
Out of bounds pointer to contract memory passed to syscall
Sourcepub const kSyscallErrorCodeNoSyscall: Self
pub const kSyscallErrorCodeNoSyscall: Self
System call for supplied number is not supported
Sourcepub const kSyscallErrorCodeIsRootTransaction: Self
pub const kSyscallErrorCodeIsRootTransaction: Self
Cannot call get_msg_sender on root invocation
Sourcepub const kSyscallErrorCodeReentrance: Self
pub const kSyscallErrorCodeReentrance: Self
Reentrance guard violation
Sourcepub const kSyscallErrorCodeContractAlreadyDeployed: Self
pub const kSyscallErrorCodeContractAlreadyDeployed: Self
Attempt made to deploy a contract twice (same nonce and contract hash, from same address)
Sourcepub const kSyscallErrorCodeNoReturnBufferAvailable: Self
pub const kSyscallErrorCodeNoReturnBufferAvailable: Self
No return buffer is available. Either the most recent subcall faulted, or there have been no subcalls within this call frame.
Sourcepub const kSyscallErrorCodeInvalidSyscallInput: Self
pub const kSyscallErrorCodeInvalidSyscallInput: Self
Invalid input to a syscall, such as subtracting below 0 on an nnint or a bytestring that is too long
Sourcepub const kSyscallErrorCodeStorageKeyNotExist: Self
pub const kSyscallErrorCodeStorageKeyNotExist: Self
Accessing a storage key that does not exist in the current view
Sourcepub const kSyscallErrorCodeNoRetrocausalQueueEntry: Self
pub const kSyscallErrorCodeNoRetrocausalQueueEntry: Self
No entry in the retrocausal queue to consume
Sourcepub const kSyscallErrorCodeRetrocausalQueueReadLimitReached: Self
pub const kSyscallErrorCodeRetrocausalQueueReadLimitReached: Self
The transaction has reached its per-transaction limit on concurrent retrocausal-queue reads (kMaxConcurrentRcqReadsPerTx). This is a resource limit, not a malformed call, and does not by itself fail the transaction; a contract may use it as a stop condition (e.g. drain a queue until it returns this).
Sourcepub const kSyscallErrorCodeInvokeDepthExceeded: Self
pub const kSyscallErrorCodeInvokeDepthExceeded: Self
The invocation would exceed the network’s cross-invoke depth bound (kConfigParamMaxCrossInvokeDepth), which limits how many invocation frames one transaction may hold open at once. Like the retrocausal-queue read limit this is a resource limit, not a malformed call: the same invocation succeeds from a shallower frame. It is reported before any child frame runs, so the syscall is a complete no-op and the caller’s invoke outputs are left untouched.
Trait Implementations§
Source§impl Clone for SyscallErrorCode
impl Clone for SyscallErrorCode
Source§impl ConstMaxSize for SyscallErrorCode
impl ConstMaxSize for SyscallErrorCode
Source§impl ConstMaxSize for SyscallErrorCode
impl ConstMaxSize for SyscallErrorCode
impl Copy for SyscallErrorCode
Source§impl Debug for SyscallErrorCode
impl Debug for SyscallErrorCode
Source§impl<'de> Deserialize<'de> for SyscallErrorCode
impl<'de> Deserialize<'de> for SyscallErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for SyscallErrorCode
Available on crate feature std only.
impl Display for SyscallErrorCode
std only.impl EncodesAs<SyscallErrorCode> for SyscallErrorCode
impl Eq for SyscallErrorCode
Source§impl From<SyscallErrorCode> for SysErr
impl From<SyscallErrorCode> for SysErr
Source§fn from(code: SyscallErrorCode) -> Self
fn from(code: SyscallErrorCode) -> Self
Source§impl From<i32> for SyscallErrorCode
impl From<i32> for SyscallErrorCode
Source§impl Hash for SyscallErrorCode
impl Hash for SyscallErrorCode
Source§impl JsonSchema for SyscallErrorCode
impl JsonSchema for SyscallErrorCode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for SyscallErrorCode
impl Ord for SyscallErrorCode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SyscallErrorCode
impl PartialEq for SyscallErrorCode
Source§impl PartialOrd for SyscallErrorCode
impl PartialOrd for SyscallErrorCode
Source§impl<'_r> ReadXDR<'_r> for SyscallErrorCode
impl<'_r> ReadXDR<'_r> for SyscallErrorCode
Source§fn read_xdr<R: Reader<'_r>>(r: &mut R) -> ReadResult<Self>
fn read_xdr<R: Reader<'_r>>(r: &mut R) -> ReadResult<Self>
Source§fn read_xdr_in_place<'__xdrs_s, R: Reader<'_r>>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, Self>,
) -> ReadResult<Init<'__xdrs_s, Self>>
fn read_xdr_in_place<'__xdrs_s, R: Reader<'_r>>( r: &mut R, __xdrs_slot: Slot<'__xdrs_s, Self>, ) -> ReadResult<Init<'__xdrs_s, Self>>
slot, without first building it
on the stack. Read more