You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Many improvements to the mas-http crate
- make `mas_http::client` implement Service directly instead of being an async function - a Get layer that makes a Service<Uri> - better error sources in the JSON layer - make the client have a proper error type
This commit is contained in:
@@ -12,19 +12,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::layers::json::Json;
|
||||
use crate::layers::{get::Get, json::Json};
|
||||
|
||||
pub trait ServiceExt {
|
||||
fn json<T>(self) -> Json<Self, T>
|
||||
where
|
||||
Self: Sized;
|
||||
pub trait ServiceExt: Sized {
|
||||
fn json<T>(self) -> Json<Self, T>;
|
||||
|
||||
fn get(self) -> Get<Self>;
|
||||
}
|
||||
|
||||
impl<S> ServiceExt for S {
|
||||
fn json<T>(self) -> Json<Self, T>
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
fn json<T>(self) -> Json<Self, T> {
|
||||
Json::new(self)
|
||||
}
|
||||
|
||||
fn get(self) -> Get<Self> {
|
||||
Get::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user