Enum leptos::ServerFnErrorErr
source · pub enum ServerFnErrorErr<E = NoCustomError> {
WrappedServerError(E),
Registration(String),
Request(String),
ServerError(String),
Deserialization(String),
Serialization(String),
Args(String),
MissingArg(String),
Response(String),
}
Expand description
Type for errors that can occur when using server functions.
Unlike ServerFnError
, this implements std::error::Error
. This means
it can be used in situations in which the Error
trait is required, but it’s
not possible to create a blanket implementation that converts other errors into
this type.
ServerFnError
and ServerFnErrorErr
mutually implement From
, so
it is easy to convert between the two types.
Variants§
WrappedServerError(E)
A user-defined custom error type, which defaults to NoCustomError
.
Registration(String)
Error while trying to register the server function (only occurs in case of poisoned RwLock).
Request(String)
Occurs on the client if there is a network error while trying to run function on server.
ServerError(String)
Occurs when there is an error while actually running the function on the server.
Deserialization(String)
Occurs on the client if there is an error deserializing the server’s response.
Serialization(String)
Occurs on the client if there is an error serializing the server function arguments.
Args(String)
Occurs on the server if there is an error deserializing one of the arguments that’s been sent.
MissingArg(String)
Occurs on the server if there’s a missing argument.
Response(String)
Occurs on the server if there is an error creating an HTTP response.
Trait Implementations§
source§impl<E> Clone for ServerFnErrorErr<E>where
E: Clone,
impl<E> Clone for ServerFnErrorErr<E>where
E: Clone,
source§fn clone(&self) -> ServerFnErrorErr<E>
fn clone(&self) -> ServerFnErrorErr<E>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<E> Debug for ServerFnErrorErr<E>where
E: Debug,
impl<E> Debug for ServerFnErrorErr<E>where
E: Debug,
source§impl<E> Display for ServerFnErrorErr<E>where
E: Display,
impl<E> Display for ServerFnErrorErr<E>where
E: Display,
source§impl<E> Error for ServerFnErrorErr<E>
impl<E> Error for ServerFnErrorErr<E>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl<CustErr> From<ServerFnError<CustErr>> for ServerFnErrorErr<CustErr>
impl<CustErr> From<ServerFnError<CustErr>> for ServerFnErrorErr<CustErr>
source§fn from(value: ServerFnError<CustErr>) -> ServerFnErrorErr<CustErr>
fn from(value: ServerFnError<CustErr>) -> ServerFnErrorErr<CustErr>
source§impl<CustErr> From<ServerFnUrlError<CustErr>> for ServerFnErrorErr<CustErr>
impl<CustErr> From<ServerFnUrlError<CustErr>> for ServerFnErrorErr<CustErr>
source§fn from(error: ServerFnUrlError<CustErr>) -> ServerFnErrorErr<CustErr>
fn from(error: ServerFnUrlError<CustErr>) -> ServerFnErrorErr<CustErr>
source§impl<E> PartialEq for ServerFnErrorErr<E>where
E: PartialEq,
impl<E> PartialEq for ServerFnErrorErr<E>where
E: PartialEq,
source§fn eq(&self, other: &ServerFnErrorErr<E>) -> bool
fn eq(&self, other: &ServerFnErrorErr<E>) -> bool
self
and other
values to be equal, and is used
by ==
.impl<E> Eq for ServerFnErrorErr<E>where
E: Eq,
impl<E> StructuralPartialEq for ServerFnErrorErr<E>
Auto Trait Implementations§
impl<E> Freeze for ServerFnErrorErr<E>where
E: Freeze,
impl<E> RefUnwindSafe for ServerFnErrorErr<E>where
E: RefUnwindSafe,
impl<E> Send for ServerFnErrorErr<E>where
E: Send,
impl<E> Sync for ServerFnErrorErr<E>where
E: Sync,
impl<E> Unpin for ServerFnErrorErr<E>where
E: Unpin,
impl<E> UnwindSafe for ServerFnErrorErr<E>where
E: UnwindSafe,
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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