pub struct SpinResponse(pub SpinResponseParts);Expand description
This is here because the orphan rule does not allow us to implement it on IncomingRequest with the generic error. So we have to wrap it to make it happy
Tuple Fields§
§0: SpinResponsePartsTrait Implementations§
Source§impl<CustErr> Res<CustErr> for SpinResponse
impl<CustErr> Res<CustErr> for SpinResponse
Source§fn try_from_string(
content_type: &str,
data: String,
) -> Result<Self, ServerFnError<CustErr>>
fn try_from_string( content_type: &str, data: String, ) -> Result<Self, ServerFnError<CustErr>>
Attempts to convert a UTF-8 string into an HTTP response.
Source§fn try_from_bytes(
content_type: &str,
data: Bytes,
) -> Result<Self, ServerFnError<CustErr>>
fn try_from_bytes( content_type: &str, data: Bytes, ) -> Result<Self, ServerFnError<CustErr>>
Attempts to convert a binary blob represented as bytes into an HTTP response.
Source§fn try_from_stream(
content_type: &str,
data: impl Stream<Item = Result<Bytes, ServerFnError<CustErr>>> + Send + 'static,
) -> Result<Self, ServerFnError<CustErr>>
fn try_from_stream( content_type: &str, data: impl Stream<Item = Result<Bytes, ServerFnError<CustErr>>> + Send + 'static, ) -> Result<Self, ServerFnError<CustErr>>
Attempts to convert a stream of bytes into an HTTP response.
Source§fn error_response(path: &str, err: &ServerFnError<CustErr>) -> Self
fn error_response(path: &str, err: &ServerFnError<CustErr>) -> Self
Converts an error into a response, with a
500 status code and the error text as its body.Auto Trait Implementations§
impl Freeze for SpinResponse
impl !RefUnwindSafe for SpinResponse
impl Send for SpinResponse
impl !Sync for SpinResponse
impl Unpin for SpinResponse
impl !UnwindSafe for SpinResponse
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more