#[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: SyscallErrorCode
pub const kSyscallErrorCodeNone: SyscallErrorCode
No error
Sourcepub const kSyscallErrorCodeFault: SyscallErrorCode
pub const kSyscallErrorCodeFault: SyscallErrorCode
Out of bounds pointer to contract memory passed to syscall
Sourcepub const kSyscallErrorCodeNoSyscall: SyscallErrorCode
pub const kSyscallErrorCodeNoSyscall: SyscallErrorCode
System call for supplied number is not supported
Sourcepub const kSyscallErrorCodeIsRootTransaction: SyscallErrorCode
pub const kSyscallErrorCodeIsRootTransaction: SyscallErrorCode
Cannot call get_msg_sender on root invocation
Sourcepub const kSyscallErrorCodeReentrance: SyscallErrorCode
pub const kSyscallErrorCodeReentrance: SyscallErrorCode
Reentrance guard violation
Sourcepub const kSyscallErrorCodeContractAlreadyDeployed: SyscallErrorCode
pub const kSyscallErrorCodeContractAlreadyDeployed: SyscallErrorCode
Attempt made to deploy a contract twice (same nonce and contract hash, from same address)
Sourcepub const kSyscallErrorCodeNoReturnBufferAvailable: SyscallErrorCode
pub const kSyscallErrorCodeNoReturnBufferAvailable: SyscallErrorCode
No return buffer is available. Either the most recent subcall faulted, or there have been no subcalls within this call frame.
Sourcepub const kSyscallErrorCodeInvalidSyscallInput: SyscallErrorCode
pub const kSyscallErrorCodeInvalidSyscallInput: SyscallErrorCode
Invalid input to a syscall, such as subtracting below 0 on an nnint or a bytestring that is too long
Sourcepub const kSyscallErrorCodeStorageKeyNotExist: SyscallErrorCode
pub const kSyscallErrorCodeStorageKeyNotExist: SyscallErrorCode
Accessing a storage key that does not exist in the current view
Sourcepub const kSyscallErrorCodeNoRetrocausalQueueEntry: SyscallErrorCode
pub const kSyscallErrorCodeNoRetrocausalQueueEntry: SyscallErrorCode
No entry in the retrocausal queue to consume
Sourcepub const kSyscallErrorCodeRetrocausalQueueReadLimitReached: SyscallErrorCode
pub const kSyscallErrorCodeRetrocausalQueueReadLimitReached: SyscallErrorCode
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: SyscallErrorCode
pub const kSyscallErrorCodeInvokeDepthExceeded: SyscallErrorCode
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§fn clone(&self) -> SyscallErrorCode
fn clone(&self) -> SyscallErrorCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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 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) -> SysErr
fn from(code: SyscallErrorCode) -> SysErr
Source§impl From<i32> for SyscallErrorCode
impl From<i32> for SyscallErrorCode
Source§fn from(v: i32) -> SyscallErrorCode
fn from(v: i32) -> 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
Source§fn cmp(&self, other: &SyscallErrorCode) -> Ordering
fn cmp(&self, other: &SyscallErrorCode) -> Ordering
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>(r: &mut R) -> Result<SyscallErrorCode, ReadError>where
R: Reader<'_r>,
fn read_xdr<R>(r: &mut R) -> Result<SyscallErrorCode, ReadError>where
R: Reader<'_r>,
Source§fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, SyscallErrorCode>,
) -> Result<Init<'__xdrs_s, SyscallErrorCode>, ReadError>where
R: Reader<'_r>,
fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, SyscallErrorCode>,
) -> Result<Init<'__xdrs_s, SyscallErrorCode>, ReadError>where
R: Reader<'_r>,
slot, without first building it
on the stack. Read more