pub struct NodeApiError<D = Value> {
pub kind: NodeErrorKind,
pub msg: String,
pub data: D,
pub sensitive: bool,
}Fields§
§kind: NodeErrorKind§msg: String§data: DStructured data associated with this error.
sensitive: boolWhether data contains sensitive information that Lexe
shouldn’t see (e.g. a route). Such data may still be logged by
the app or in SDKs but shouldn’t be logged inside Lexe infra.
Implementations§
Source§impl NodeApiError
impl NodeApiError
pub fn wrong_user_pk(current_pk: UserPk, given_pk: UserPk) -> Self
pub fn wrong_node_pk(derived_pk: NodePk, given_pk: NodePk) -> Self
pub fn wrong_measurement( req_measurement: &Measurement, actual_measurement: &Measurement, ) -> Self
pub fn proxy(error: impl Display) -> Self
pub fn provision(error: impl Display) -> Self
pub fn command(error: impl Display) -> Self
pub fn bad_auth(error: impl Display) -> Self
pub fn not_found(error: impl Display) -> Self
Trait Implementations§
Source§impl<D: Clone> Clone for NodeApiError<D>
impl<D: Clone> Clone for NodeApiError<D>
Source§fn clone(&self) -> NodeApiError<D>
fn clone(&self) -> NodeApiError<D>
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<D: Debug> Debug for NodeApiError<D>
impl<D: Debug> Debug for NodeApiError<D>
Source§impl<D: Default> Default for NodeApiError<D>
impl<D: Default> Default for NodeApiError<D>
Source§fn default() -> NodeApiError<D>
fn default() -> NodeApiError<D>
Returns the “default value” for a type. Read more
Source§impl Display for NodeApiError
impl Display for NodeApiError
Source§impl<D> Error for NodeApiError<D>
impl<D> Error for NodeApiError<D>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<CommonApiError> for NodeApiError
impl From<CommonApiError> for NodeApiError
Source§fn from(common_error: CommonApiError) -> Self
fn from(common_error: CommonApiError) -> Self
Converts to this type from the input type.
Source§impl From<ErrorResponse> for NodeApiError
impl From<ErrorResponse> for NodeApiError
Source§fn from(err_resp: ErrorResponse) -> Self
fn from(err_resp: ErrorResponse) -> Self
Converts to this type from the input type.
Source§impl From<NodeApiError> for ErrorResponse
impl From<NodeApiError> for ErrorResponse
Source§fn from(api_error: NodeApiError) -> Self
fn from(api_error: NodeApiError) -> Self
Converts to this type from the input type.
Source§impl<D: PartialEq> PartialEq for NodeApiError<D>
impl<D: PartialEq> PartialEq for NodeApiError<D>
Source§impl ToHttpStatus for NodeApiError
impl ToHttpStatus for NodeApiError
fn to_http_status(&self) -> StatusCode
impl<D: Eq> Eq for NodeApiError<D>
impl<D> StructuralPartialEq for NodeApiError<D>
Auto Trait Implementations§
impl<D> Freeze for NodeApiError<D>where
D: Freeze,
impl<D> RefUnwindSafe for NodeApiError<D>where
D: RefUnwindSafe,
impl<D> Send for NodeApiError<D>where
D: Send,
impl<D> Sync for NodeApiError<D>where
D: Sync,
impl<D> Unpin for NodeApiError<D>where
D: Unpin,
impl<D> UnsafeUnpin for NodeApiError<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for NodeApiError<D>where
D: UnwindSafe,
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