Struct leptos_spin::response::SpinResponse
source · 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: SpinResponseParts
Trait 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