Enum cloud_code::StatusCode
source · [−]pub enum StatusCode {
Show 85 variants
Success,
ConvertIntError,
NoneStatusCode,
FatalError,
MisbehaveNode,
BannedNode,
AddressOriginCheckError,
ProvideAddressError,
NoProvideAddress,
NoBlock,
NoProof,
NoTxHeight,
NoTxIndex,
NoTransaction,
NoBlockHeight,
NoBlockHash,
NoneProposal,
NoneBlockBody,
NoneBlockHeader,
NoneChainStatus,
NoneWitness,
NoneTransaction,
NoneUtxo,
NoneRawTx,
EarlyStatus,
ExecuteError,
EncodeError,
DecodeError,
NoCandidate,
NoEarlyStatus,
NoForkTree,
DupTransaction,
ProposalTooHigh,
ProposalTooLow,
ProposalCheckError,
ConsensusProposalCheckError,
BlockCheckError,
CSISigCheckError,
VersionOrIdCheckError,
HashCheckError,
HashLenError,
SigLenError,
SigCheckError,
NodeInSyncMode,
HistoryDupTx,
EmergencyBrake,
InvalidVersion,
InvalidTo,
InvalidNonce,
InvalidValidUntilBlock,
InvalidValue,
InvalidChainId,
InvalidWitness,
InvalidLockId,
InvalidPreHash,
AdminCheckError,
ModuleNotController,
TransactionsExceed,
ConsensusServerNotReady,
ProposalProofError,
KmsServerNotReady,
NoneHashResult,
NotFoundAccount,
ConstructSigError,
ConstructKeyPairError,
SignError,
InsertAccountError,
NetworkServerNotReady,
SendMsgError,
BroadcastMsgError,
MultiAddrParseError,
DialNodeFail,
AddExistedPeer,
ExecuteServerNotReady,
InternalChannelDisconnected,
ReenterBlock,
ReenterInvalidBlock,
StorageServerNotReady,
NotFound,
InvalidRegion,
InvalidKey,
BadRegion,
StoreError,
LoadError,
DeleteError,
}
Expand description
The response status code
Variants
Success
Success: 0
ConvertIntError
Convert int to status Error
NoneStatusCode
status code is none
FatalError
fate error
MisbehaveNode
controller error, start from 100 node in misbehave list
BannedNode
node in ban list
AddressOriginCheckError
address not consistent with record origin
ProvideAddressError
provide address len is not 20
NoProvideAddress
message not provide address
NoBlock
not get the block
NoProof
not get the proof
NoTxHeight
not get height of block which wrap tx
NoTxIndex
not get tx index
NoTransaction
not get transaction
NoBlockHeight
not get the block height base on hash
NoBlockHash
not get the block hash base on height
NoneProposal
proposal is none
NoneBlockBody
block body is none
NoneBlockHeader
block header is none
NoneChainStatus
chain status is none
NoneWitness
transaction’s witness is none
NoneTransaction
transaction is none
NoneUtxo
utxo is none
NoneRawTx
raw tx is none
EarlyStatus
early status received
ExecuteError
execute error
EncodeError
proto struct encode error
DecodeError
proto struct encode error
NoCandidate
no candidate block
NoEarlyStatus
not get early status
NoForkTree
fork tree no block
DupTransaction
find dup transaction
ProposalTooHigh
proposal too high
ProposalTooLow
proposal too low
ProposalCheckError
proposal check error
ConsensusProposalCheckError
consensus check proposal error
BlockCheckError
block hash check error
CSISigCheckError
the sig of chain status init check error
VersionOrIdCheckError
chain version or chain id check error
HashCheckError
hash check error
HashLenError
hash len is not correct
SigLenError
signature len is not correct
SigCheckError
signature check error
NodeInSyncMode
the node in sync mode
HistoryDupTx
Dup tx in history
EmergencyBrake
emergency brake
InvalidVersion
auth check tx’s version error
InvalidTo
auth check tx’s to error
InvalidNonce
auth check tx’s nonce error
InvalidValidUntilBlock
auth check tx’s valid until block error
InvalidValue
auth check tx’s value error
InvalidChainId
auth check tx’s chain id error
InvalidWitness
auth limit utxo’s witness only one
InvalidLockId
auth check utxo’s lock id error
InvalidPreHash
auth check utxo’s pre tx hash error
AdminCheckError
auth check send is not admin
ModuleNotController
network msg’s module not controller
TransactionsExceed
the size of txs has exceeded package-limit
ConsensusServerNotReady
Consensus from 200 check proposal proof error
ProposalProofError
proof of proposal error
KmsServerNotReady
Kms from 300 Kms server not ready
NoneHashResult
hash result is none
NotFoundAccount
kms not found account base on id
ConstructSigError
construct signature error
ConstructKeyPairError
construct key pair error
SignError
sign error
InsertAccountError
insert account error
NetworkServerNotReady
Network from 400 Network server not ready
SendMsgError
send message error
BroadcastMsgError
broadcast message error
MultiAddrParseError
multi-addr error
DialNodeFail
dial node failed
AddExistedPeer
ExecuteServerNotReady
executor from 500 Executor server not ready
InternalChannelDisconnected
internal channel disconnected
ReenterBlock
early same block reenter
ReenterInvalidBlock
invalid block reenter
StorageServerNotReady
storage from 600 storage server not ready
NotFound
kv not found
InvalidRegion
invalid region
InvalidKey
invalid key
BadRegion
bad region
StoreError
store data error
LoadError
load data error
DeleteError
delete data error
Implementations
sourceimpl StatusCode
impl StatusCode
pub fn is_success(&self) -> Result<(), StatusCode>
Trait Implementations
sourceimpl Clone for StatusCode
impl Clone for StatusCode
sourcefn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StatusCode
impl Debug for StatusCode
sourceimpl Display for StatusCode
impl Display for StatusCode
sourceimpl Error for StatusCode
impl Error for StatusCode
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<StatusCode> for u16
impl From<StatusCode> for u16
sourcefn from(v: StatusCode) -> Self
fn from(v: StatusCode) -> Self
Converts to this type from the input type.
sourceimpl From<StatusCode> for u32
impl From<StatusCode> for u32
sourcefn from(v: StatusCode) -> Self
fn from(v: StatusCode) -> Self
Converts to this type from the input type.
sourceimpl From<StatusCode> for u64
impl From<StatusCode> for u64
sourcefn from(v: StatusCode) -> Self
fn from(v: StatusCode) -> Self
Converts to this type from the input type.
sourceimpl From<StatusCode> for u128
impl From<StatusCode> for u128
sourcefn from(v: StatusCode) -> Self
fn from(v: StatusCode) -> Self
Converts to this type from the input type.
sourceimpl From<StatusCode> for StatusCode
impl From<StatusCode> for StatusCode
sourcefn from(status: StatusCode) -> Self
fn from(status: StatusCode) -> Self
Converts to this type from the input type.
sourceimpl From<u128> for StatusCode
impl From<u128> for StatusCode
sourceimpl From<u16> for StatusCode
impl From<u16> for StatusCode
sourceimpl From<u32> for StatusCode
impl From<u32> for StatusCode
sourceimpl From<u64> for StatusCode
impl From<u64> for StatusCode
sourceimpl FromPrimitive for StatusCode
impl FromPrimitive for StatusCode
sourcefn from_i64(n: i64) -> Option<Self>
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. Read more
sourcefn from_u64(n: u64) -> Option<Self>
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. Read more
sourcefn from_isize(n: isize) -> Option<Self>
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. Read more
sourcefn from_i8(n: i8) -> Option<Self>
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. Read more
sourcefn from_i16(n: i16) -> Option<Self>
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. Read more
sourcefn from_i32(n: i32) -> Option<Self>
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. Read more
sourcefn from_i128(n: i128) -> Option<Self>
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
sourcefn from_usize(n: usize) -> Option<Self>
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. Read more
sourcefn from_u8(n: u8) -> Option<Self>
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. Read more
sourcefn from_u16(n: u16) -> Option<Self>
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. Read more
sourcefn from_u32(n: u32) -> Option<Self>
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. Read more
sourcefn from_u128(n: u128) -> Option<Self>
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
sourceimpl Into<StatusCode> for StatusCode
impl Into<StatusCode> for StatusCode
sourcefn into(self) -> StatusCode
fn into(self) -> StatusCode
Converts this type into the (usually inferred) input type.
sourceimpl PartialEq<StatusCode> for StatusCode
impl PartialEq<StatusCode> for StatusCode
impl Copy for StatusCode
impl Eq for StatusCode
impl StructuralEq for StatusCode
impl StructuralPartialEq for StatusCode
Auto Trait Implementations
impl RefUnwindSafe for StatusCode
impl Send for StatusCode
impl Sync for StatusCode
impl Unpin for StatusCode
impl UnwindSafe for StatusCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more