#[repr(i32)]pub enum ErrorCode {
ERROR_CODE_UNSPECIFIED = 0,
ERROR_CODE_BAD_REQUEST = 1,
ERROR_CODE_INVALID_ARGUMENT = 2,
ERROR_CODE_NOT_FOUND = 3,
ERROR_CODE_UNAVAILABLE = 4,
ERROR_CODE_UPSTREAM_ERROR = 5,
}Expand description
ErrorCode is a stable domain error code enum for Market Overview. It is used for consistent error surfaces across ConnectRPC and REST.
Variants§
ERROR_CODE_UNSPECIFIED = 0
ERROR_CODE_BAD_REQUEST = 1
ERROR_CODE_INVALID_ARGUMENT = 2
ERROR_CODE_NOT_FOUND = 3
ERROR_CODE_UNAVAILABLE = 4
ERROR_CODE_UPSTREAM_ERROR = 5
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const Unspecified: Self = Self::ERROR_CODE_UNSPECIFIED
pub const Unspecified: Self = Self::ERROR_CODE_UNSPECIFIED
Idiomatic alias for Self::ERROR_CODE_UNSPECIFIED; Debug prints the variant name.
Sourcepub const BadRequest: Self = Self::ERROR_CODE_BAD_REQUEST
pub const BadRequest: Self = Self::ERROR_CODE_BAD_REQUEST
Idiomatic alias for Self::ERROR_CODE_BAD_REQUEST; Debug prints the variant name.
Sourcepub const InvalidArgument: Self = Self::ERROR_CODE_INVALID_ARGUMENT
pub const InvalidArgument: Self = Self::ERROR_CODE_INVALID_ARGUMENT
Idiomatic alias for Self::ERROR_CODE_INVALID_ARGUMENT; Debug prints the variant name.
Sourcepub const NotFound: Self = Self::ERROR_CODE_NOT_FOUND
pub const NotFound: Self = Self::ERROR_CODE_NOT_FOUND
Idiomatic alias for Self::ERROR_CODE_NOT_FOUND; Debug prints the variant name.
Idiomatic alias for Self::ERROR_CODE_UNAVAILABLE; Debug prints the variant name.
Sourcepub const UpstreamError: Self = Self::ERROR_CODE_UPSTREAM_ERROR
pub const UpstreamError: Self = Self::ERROR_CODE_UPSTREAM_ERROR
Idiomatic alias for Self::ERROR_CODE_UPSTREAM_ERROR; Debug prints the variant name.
Trait Implementations§
impl Copy for ErrorCode
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Enumeration for ErrorCode
impl Enumeration for ErrorCode
Source§fn proto_name(&self) -> &'static str
fn proto_name(&self) -> &'static str
The name of this enum variant as it appears in the
.proto file.impl Eq for ErrorCode
Source§impl ProtoElemJson for ErrorCode
impl ProtoElemJson for ErrorCode
Source§fn serialize_proto_json<S: Serializer>(
v: &Self,
s: S,
) -> Result<S::Ok, S::Error>
fn serialize_proto_json<S: Serializer>( v: &Self, s: S, ) -> Result<S::Ok, S::Error>
Serialize this value with proto3 JSON semantics.
Source§fn deserialize_proto_json<'de, D: Deserializer<'de>>(
d: D,
) -> Result<Self, D::Error>
fn deserialize_proto_json<'de, D: Deserializer<'de>>( d: D, ) -> Result<Self, D::Error>
Deserialize a value with proto3 JSON semantics.
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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.