actix / actix/actix-web

Provide mutable reference APIs for errors

オープン
#4,061 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
24.8k
フォーク
1.9k
平均マージ
23時間 10分
マージ済み PR(30日)
26

説明

Somewhat related to https://github.com/actix/actix-web/issues/3758

`&mut` equivalents of `actix_web::Error::as_response/as_error` and similarly `HttpResponse::error` could be provided.

An example use case for them: when an `actix_web::Error` wraps a custom Error type that provides an unresolved `backtrace::Backtrace` (via [Backtrace::new_unresolved](https://docs.rs/backtrace/0.3.76/backtrace/struct.Backtrace.html#method.new_unresolved)). Allowing mutability of its inner Error enables the ability to resolve such a `Backtrace` as lazily as possible/only when needed, e.g. in a middleware that emits certain Error's stacktraces to a service like Sentry.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。