pub struct Pretty(pub Node);
Available on crate feature
pretty
only.Expand description
A wrapper around Node
that is always pretty printed.
Tuple Fields§
§0: Node
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Pretty
impl<'de> Deserialize<'de> for Pretty
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Pretty, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Pretty, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl IntoResponse for Pretty
impl IntoResponse for Pretty
source§fn into_response(self) -> Response<UnsyncBoxBody<Bytes, Error>>
fn into_response(self) -> Response<UnsyncBoxBody<Bytes, Error>>
Create a response.
source§impl PartialEq<Pretty> for Pretty
impl PartialEq<Pretty> for Pretty
source§impl Serialize for Pretty
impl Serialize for Pretty
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Pretty
impl StructuralEq for Pretty
impl StructuralPartialEq for Pretty
Auto Trait Implementations§
impl RefUnwindSafe for Pretty
impl Send for Pretty
impl Sync for Pretty
impl Unpin for Pretty
impl UnwindSafe for Pretty
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<T, S, B> Handler<IntoResponseHandler, S, B> for Twhere
T: IntoResponse + Clone + Send + 'static,
B: Send + 'static,
impl<T, S, B> Handler<IntoResponseHandler, S, B> for Twhere T: IntoResponse + Clone + Send + 'static, B: Send + 'static,
§type Future = Ready<Response<UnsyncBoxBody<Bytes, Error>>>
type Future = Ready<Response<UnsyncBoxBody<Bytes, Error>>>
The type of future calling this handler returns.
§fn call(
self,
_req: Request<B>,
_state: S
) -> <T as Handler<IntoResponseHandler, S, B>>::Future
fn call( self, _req: Request<B>, _state: S ) -> <T as Handler<IntoResponseHandler, S, B>>::Future
Call the handler with the given request.
§fn layer<L, NewReqBody>(self, layer: L) -> Layered<L, Self, T, S, B, NewReqBody>where
L: Layer<HandlerService<Self, T, S, B>> + Clone,
<L as Layer<HandlerService<Self, T, S, B>>>::Service: Service<Request<NewReqBody>>,
fn layer<L, NewReqBody>(self, layer: L) -> Layered<L, Self, T, S, B, NewReqBody>where L: Layer<HandlerService<Self, T, S, B>> + Clone, <L as Layer<HandlerService<Self, T, S, B>>>::Service: Service<Request<NewReqBody>>,
Apply a [
tower::Layer
] to the handler. Read more§fn with_state(self, state: S) -> HandlerService<Self, T, S, B>
fn with_state(self, state: S) -> HandlerService<Self, T, S, B>
Convert the handler into a [
Service
] by providing the state§impl<H, T, B> HandlerWithoutStateExt<T, B> for Hwhere
H: Handler<T, (), B>,
impl<H, T, B> HandlerWithoutStateExt<T, B> for Hwhere H: Handler<T, (), B>,
§fn into_service(self) -> HandlerService<H, T, (), B>
fn into_service(self) -> HandlerService<H, T, (), B>
Convert the handler into a [
Service
] and no state.§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, (), B>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, (), B>>
Convert the handler into a
MakeService
and no state. Read more