MCPcopy Create free account
hub / github.com/solana-program/system / from

Method from

interface/src/error.rs:128–141  ·  view source on GitHub ↗
(error: u64)

Source from the content-addressed store, hash-verified

126
127impl From<u64> for SystemError {
128 fn from(error: u64) -> Self {
129 match error {
130 0 => SystemError::AccountAlreadyInUse,
131 1 => SystemError::ResultWithNegativeLamports,
132 2 => SystemError::InvalidProgramId,
133 3 => SystemError::InvalidAccountDataLength,
134 4 => SystemError::MaxSeedLengthExceeded,
135 5 => SystemError::AddressWithSeedMismatch,
136 6 => SystemError::NonceNoRecentBlockhashes,
137 7 => SystemError::NonceBlockhashNotExpired,
138 8 => SystemError::NonceUnexpectedBlockhashValue,
139 _ => panic!("Unsupported SystemError"),
140 }
141 }
142}
143
144#[cfg(test)]

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected