#[repr(i32)]pub enum Code {
Show 22 variants
Unknown = 0,
Unimplemented = 1,
NotFound = 2,
AlreadyExists = 3,
Unauthorized = 4,
BadRequest = 5,
InvalidRequestType = 6,
InvalidAccountId = 7,
InvalidTransfer = 8,
MessageTooLarge = 10,
InvalidSignature = 11,
VerificationFailed = 12,
ReplayProtection = 20,
InvalidExpression = 21,
IncorrectType = 22,
AccountFrozen = 23,
UnmodifiedState = 24,
InsufficientBalance = 25,
BalanceOverflow = 26,
AccountDepthExceeded = 27,
HoldingLimitExceeded = 28,
InvalidTarget = 30,
}Variants§
Unknown = 0
Generic status codes
Unimplemented = 1
NotFound = 2
AlreadyExists = 3
BadRequest = 5
Request is malformed
InvalidRequestType = 6
Invalid/unsupported transaction request type
InvalidAccountId = 7
Invalid account ID
InvalidTransfer = 8
Invalid transfer parameters (amount, accounts, etc)
MessageTooLarge = 10
The request message was too large to be processed.
InvalidSignature = 11
The request signature does not match the request payload
VerificationFailed = 12
Signature verification failed
ReplayProtection = 20
Replay protection was triggered, e.g. nonce reuse, bad block window
InvalidExpression = 21
Invalid expression used
IncorrectType = 22
AccountFrozen = 23
Ledger-specific status codes
UnmodifiedState = 24
InsufficientBalance = 25
BalanceOverflow = 26
AccountDepthExceeded = 27
HoldingLimitExceeded = 28
InvalidTarget = 30
Action specific status codes
Implementations§
Source§impl Code
impl Code
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Code>
pub fn from_str_name(value: &str) -> Option<Code>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Code
impl<'de> Deserialize<'de> for Code
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Code, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Code, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Code
impl Ord for Code
Source§impl PartialOrd for Code
impl PartialOrd for Code
Source§impl Serialize for Code
impl Serialize for Code
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Code
impl Eq for Code
impl StructuralPartialEq for Code
Auto Trait Implementations§
impl Freeze for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnsafeUnpin for Code
impl UnwindSafe for Code
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request