#[repr(i32)]pub enum ProtoErrorCode {
UnknownError = 1,
UnsupportedMessage = 2,
InvalidRequest = 3,
TimeoutError = 5,
EntityNotFound = 6,
CantRouteRequest = 7,
FrameTooLong = 8,
MarketClosed = 9,
ConcurrentModification = 10,
BlockedPayloadType = 11,
}Expand description
COMMON error codes 1 - 99
Variants§
UnknownError = 1
Generic error.
UnsupportedMessage = 2
Message is not supported. Wrong message.
InvalidRequest = 3
Generic error. Usually used when input value is not correct.
TimeoutError = 5
Deal execution is reached timeout and rejected.
EntityNotFound = 6
Generic error for requests by id.
CantRouteRequest = 7
Connection to Server is lost or not supported.
FrameTooLong = 8
Message is too large.
MarketClosed = 9
Market is closed.
ConcurrentModification = 10
Order is blocked (e.g. under execution) and change cannot be applied.
BlockedPayloadType = 11
Message is blocked by server or rate limit is reached.
Implementations§
Source§impl ProtoErrorCode
impl ProtoErrorCode
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<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for ProtoErrorCode
impl Clone for ProtoErrorCode
Source§fn clone(&self) -> ProtoErrorCode
fn clone(&self) -> ProtoErrorCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtoErrorCode
impl Debug for ProtoErrorCode
Source§impl Default for ProtoErrorCode
impl Default for ProtoErrorCode
Source§fn default() -> ProtoErrorCode
fn default() -> ProtoErrorCode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProtoErrorCode
impl<'de> Deserialize<'de> for ProtoErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ProtoErrorCode> for i32
impl From<ProtoErrorCode> for i32
Source§fn from(value: ProtoErrorCode) -> i32
fn from(value: ProtoErrorCode) -> i32
Converts to this type from the input type.
Source§impl Hash for ProtoErrorCode
impl Hash for ProtoErrorCode
Source§impl Ord for ProtoErrorCode
impl Ord for ProtoErrorCode
Source§fn cmp(&self, other: &ProtoErrorCode) -> Ordering
fn cmp(&self, other: &ProtoErrorCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ProtoErrorCode
impl PartialEq for ProtoErrorCode
Source§impl PartialOrd for ProtoErrorCode
impl PartialOrd for ProtoErrorCode
Source§impl Serialize for ProtoErrorCode
impl Serialize for ProtoErrorCode
Source§impl TryFrom<i32> for ProtoErrorCode
impl TryFrom<i32> for ProtoErrorCode
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<ProtoErrorCode, UnknownEnumValue>
fn try_from(value: i32) -> Result<ProtoErrorCode, UnknownEnumValue>
Performs the conversion.
impl Copy for ProtoErrorCode
impl Eq for ProtoErrorCode
impl StructuralPartialEq for ProtoErrorCode
Auto Trait Implementations§
impl Freeze for ProtoErrorCode
impl RefUnwindSafe for ProtoErrorCode
impl Send for ProtoErrorCode
impl Sync for ProtoErrorCode
impl Unpin for ProtoErrorCode
impl UnwindSafe for ProtoErrorCode
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§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.