pub enum StatusCode {
Show 86 variants
Success = 0,
ConvertIntError = 1,
NoneStatusCode = 2,
FatalError = 3,
MisbehaveNode = 100,
BannedNode = 101,
AddressOriginCheckError = 102,
ProvideAddressError = 103,
NoProvideAddress = 104,
NoBlock = 105,
NoProof = 106,
NoTxHeight = 107,
NoTxIndex = 108,
NoTransaction = 109,
NoBlockHeight = 110,
NoBlockHash = 111,
NoneProposal = 112,
NoneBlockBody = 113,
NoneBlockHeader = 114,
NoneChainStatus = 115,
NoneWitness = 116,
NoneTransaction = 117,
NoneUtxo = 118,
NoneRawTx = 119,
EarlyStatus = 120,
ExecuteError = 121,
EncodeError = 122,
DecodeError = 123,
NoCandidate = 124,
NoEarlyStatus = 125,
NoForkTree = 126,
DupTransaction = 127,
ProposalTooHigh = 128,
ProposalTooLow = 129,
ProposalCheckError = 130,
ConsensusProposalCheckError = 131,
BlockCheckError = 132,
CSISigCheckError = 133,
VersionOrIdCheckError = 134,
HashCheckError = 135,
HashLenError = 136,
SigLenError = 137,
SigCheckError = 138,
NodeInSyncMode = 139,
HistoryDupTx = 140,
EmergencyBrake = 141,
InvalidVersion = 142,
InvalidTo = 143,
InvalidNonce = 144,
InvalidValidUntilBlock = 145,
InvalidValue = 146,
InvalidChainId = 147,
InvalidWitness = 148,
InvalidLockId = 149,
InvalidPreHash = 150,
AdminCheckError = 151,
ModuleNotController = 152,
QuotaUsedExceed = 153,
NoStateRoot = 154,
StateRootCheckError = 155,
UpdateSystemConfigError = 156,
ConsensusServerNotReady = 200,
ProposalProofError = 201,
CryptoServerNotReady = 300,
NoneHashResult = 301,
ConstructSigError = 302,
ConstructKeyPairError = 303,
SignError = 304,
NetworkServerNotReady = 400,
SendMsgError = 401,
BroadcastMsgError = 402,
MultiAddrParseError = 403,
DialNodeFail = 404,
AddExistedPeer = 405,
ExecuteServerNotReady = 500,
InternalChannelDisconnected = 501,
ReenterBlock = 502,
ReenterInvalidBlock = 503,
StorageServerNotReady = 600,
NotFound = 601,
InvalidRegion = 602,
InvalidKey = 603,
BadRegion = 604,
StoreError = 605,
LoadError = 606,
DeleteError = 607,
}
Expand description
The response status code
Variants§
Success = 0
Success: 0
ConvertIntError = 1
Convert int to status Error
NoneStatusCode = 2
status code is none
FatalError = 3
fate error
MisbehaveNode = 100
controller error, start from 100 node in misbehave list
BannedNode = 101
node in ban list
AddressOriginCheckError = 102
address not consistent with record origin
ProvideAddressError = 103
provide address len is not 20
NoProvideAddress = 104
message not provide address
NoBlock = 105
not get the block
NoProof = 106
not get the proof
NoTxHeight = 107
not get height of block which wrap tx
NoTxIndex = 108
not get tx index
NoTransaction = 109
not get transaction
NoBlockHeight = 110
not get the block height base on hash
NoBlockHash = 111
not get the block hash base on height
NoneProposal = 112
proposal is none
NoneBlockBody = 113
block body is none
NoneBlockHeader = 114
block header is none
NoneChainStatus = 115
chain status is none
NoneWitness = 116
transaction’s witness is none
NoneTransaction = 117
transaction is none
NoneUtxo = 118
utxo is none
NoneRawTx = 119
raw tx is none
EarlyStatus = 120
early status received
ExecuteError = 121
execute error
EncodeError = 122
proto struct encode error
DecodeError = 123
proto struct encode error
NoCandidate = 124
no candidate block
NoEarlyStatus = 125
not get early status
NoForkTree = 126
fork tree no block
DupTransaction = 127
find dup transaction
ProposalTooHigh = 128
proposal too high
ProposalTooLow = 129
proposal too low
ProposalCheckError = 130
proposal check error
ConsensusProposalCheckError = 131
consensus check proposal error
BlockCheckError = 132
block hash check error
CSISigCheckError = 133
the sig of chain status init check error
VersionOrIdCheckError = 134
chain version or chain id check error
HashCheckError = 135
hash check error
HashLenError = 136
hash len is not correct
SigLenError = 137
signature len is not correct
SigCheckError = 138
signature check error
NodeInSyncMode = 139
the node in sync mode
HistoryDupTx = 140
Dup tx in history
EmergencyBrake = 141
emergency brake
InvalidVersion = 142
auth check tx’s version error
InvalidTo = 143
auth check tx’s to error
InvalidNonce = 144
auth check tx’s nonce error
InvalidValidUntilBlock = 145
auth check tx’s valid until block error
InvalidValue = 146
auth check tx’s value error
InvalidChainId = 147
auth check tx’s chain id error
InvalidWitness = 148
auth limit utxo’s witness only one
InvalidLockId = 149
auth check utxo’s lock id error
InvalidPreHash = 150
auth check utxo’s pre tx hash error
AdminCheckError = 151
auth check send is not admin
ModuleNotController = 152
network msg’s module not controller
QuotaUsedExceed = 153
the quota use of tx has exceeded quota-limit
NoStateRoot = 154
not get the state_root
StateRootCheckError = 155
block state_root check error
UpdateSystemConfigError = 156
update system-config error, wrong prehash or unallowed lockid
ConsensusServerNotReady = 200
Consensus from 200 check proposal proof error
ProposalProofError = 201
proof of proposal error
CryptoServerNotReady = 300
Crypto from 300 Crypto server not ready
NoneHashResult = 301
hash result is none
ConstructSigError = 302
construct signature error
ConstructKeyPairError = 303
construct key pair error
SignError = 304
sign error
NetworkServerNotReady = 400
Network from 400 Network server not ready
SendMsgError = 401
send message error
BroadcastMsgError = 402
broadcast message error
MultiAddrParseError = 403
multi-addr error
DialNodeFail = 404
dial node failed
AddExistedPeer = 405
ExecuteServerNotReady = 500
executor from 500 Executor server not ready
InternalChannelDisconnected = 501
internal channel disconnected
ReenterBlock = 502
early same block reenter
ReenterInvalidBlock = 503
invalid block reenter
StorageServerNotReady = 600
storage from 600 storage server not ready
NotFound = 601
kv not found
InvalidRegion = 602
invalid region
InvalidKey = 603
invalid key
BadRegion = 604
bad region
StoreError = 605
store data error
LoadError = 606
load data error
DeleteError = 607
delete data error
Implementations§
Source§impl StatusCode
impl StatusCode
pub fn is_success(&self) -> Result<(), StatusCode>
Trait Implementations§
Source§impl Clone for StatusCode
impl Clone for StatusCode
Source§fn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StatusCode
impl Debug for StatusCode
Source§impl Display for StatusCode
impl Display for StatusCode
Source§impl Error for StatusCode
impl Error for StatusCode
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<StatusCode> for StatusCode
impl From<StatusCode> for StatusCode
Source§fn from(status: StatusCode) -> Self
fn from(status: StatusCode) -> Self
Source§impl From<StatusCode> for u128
impl From<StatusCode> for u128
Source§fn from(v: StatusCode) -> Self
fn from(v: StatusCode) -> Self
Source§impl From<StatusCode> for u16
impl From<StatusCode> for u16
Source§fn from(v: StatusCode) -> Self
fn from(v: StatusCode) -> Self
Source§impl From<StatusCode> for u32
impl From<StatusCode> for u32
Source§fn from(v: StatusCode) -> Self
fn from(v: StatusCode) -> Self
Source§impl From<StatusCode> for u64
impl From<StatusCode> for u64
Source§fn from(v: StatusCode) -> Self
fn from(v: StatusCode) -> Self
Source§impl From<u128> for StatusCode
impl From<u128> for StatusCode
Source§impl From<u16> for StatusCode
impl From<u16> for StatusCode
Source§impl From<u32> for StatusCode
impl From<u32> for StatusCode
Source§impl From<u64> for StatusCode
impl From<u64> for StatusCode
Source§impl FromPrimitive for StatusCode
impl FromPrimitive for StatusCode
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moreSource§impl Into<StatusCode> for StatusCode
impl Into<StatusCode> for StatusCode
Source§fn into(self) -> StatusCode
fn into(self) -> StatusCode
Source§impl PartialEq for StatusCode
impl PartialEq for StatusCode
impl Copy for StatusCode
impl Eq for StatusCode
impl StructuralPartialEq for StatusCode
Auto Trait Implementations§
impl Freeze for StatusCode
impl RefUnwindSafe for StatusCode
impl Send for StatusCode
impl Sync for StatusCode
impl Unpin for StatusCode
impl UnwindSafe for StatusCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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
key
and return true
if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
T
in a tonic::Request