sark_core/http/response/
owned_shape.rs1use super::super::__private::OwnedResponse;
2use super::{IntoResponseShape, Shape, ShapeMetadata};
3
4pub trait OwnedShape: 'static {
5 type Shape: Shape<'static>;
6
7 const BODY_KIND: super::super::body_kind::ResponseKind =
8 <<Self::Shape as Shape<'static>>::Metadata as ShapeMetadata>::BODY_KIND;
9
10 fn into_shape(self) -> Self::Shape;
11}
12
13impl<T> OwnedShape for T
14where
15 T: OwnedResponse,
16{
17 type Shape = <T as IntoResponseShape<'static>>::Shape;
18
19 fn into_shape(self) -> Self::Shape {
20 self.into_response_shape()
21 }
22}