Enum StatusCode

Source
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§

Trait Implementations§

Source§

impl Clone for StatusCode

Source§

fn clone(&self) -> StatusCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StatusCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for StatusCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for StatusCode

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<StatusCode> for StatusCode

Source§

fn from(status: StatusCode) -> Self

Converts to this type from the input type.
Source§

impl From<StatusCode> for u128

Source§

fn from(v: StatusCode) -> Self

Converts to this type from the input type.
Source§

impl From<StatusCode> for u16

Source§

fn from(v: StatusCode) -> Self

Converts to this type from the input type.
Source§

impl From<StatusCode> for u32

Source§

fn from(v: StatusCode) -> Self

Converts to this type from the input type.
Source§

impl From<StatusCode> for u64

Source§

fn from(v: StatusCode) -> Self

Converts to this type from the input type.
Source§

impl From<u128> for StatusCode

Source§

fn from(v: u128) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for StatusCode

Source§

fn from(v: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for StatusCode

Source§

fn from(v: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for StatusCode

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for StatusCode

Source§

fn from_i64(n: i64) -> Option<Self>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a 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>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

impl Into<StatusCode> for StatusCode

Source§

fn into(self) -> StatusCode

Converts this type into the (usually inferred) input type.
Source§

impl PartialEq for StatusCode

Source§

fn eq(&self, other: &StatusCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for StatusCode

Source§

impl Eq for StatusCode

Source§

impl StructuralPartialEq for StatusCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more