pub enum ServerFnError<E = NoCustomError> {
RpcError(E),
NetworkError(String),
HttpError(StatusCode, String),
SerializationError(String),
DeserializationError(String),
}Variants§
RpcError(E)
Custom RPC Function Error
NetworkError(String)
Client Network Error
HttpError(StatusCode, String)
Server Error Response This will not be serialized, instead an HttpRespone is build
SerializationError(String)
Serialization Error on Client
DeserializationError(String)
Deserialization Error on Client
Implementations§
Source§impl<E> ServerFnError<E>
impl<E> ServerFnError<E>
pub fn http_error( status_code: impl TryInto<StatusCode, Error: Debug>, msg: impl Display, ) -> Self
Source§impl<E> ServerFnError<E>
impl<E> ServerFnError<E>
pub fn from(value: ServerFnError<NoCustomError>) -> Self
Source§impl ServerFnError<NoCustomError>
impl ServerFnError<NoCustomError>
pub fn into<E>(self) -> ServerFnError<E>
Trait Implementations§
Source§impl<E: Debug> Debug for ServerFnError<E>
impl<E: Debug> Debug for ServerFnError<E>
Source§impl<E> Decode for ServerFnError<E>where
E: Decode,
impl<E> Decode for ServerFnError<E>where
E: Decode,
async fn decode_async(reader: &mut impl AsyncDecoder) -> Result<Self>
fn decode(reader: &mut impl Decoder) -> Result<Self>
Source§impl<E> Display for ServerFnError<E>
impl<E> Display for ServerFnError<E>
Source§impl<E> Encode for ServerFnError<E>where
E: Encode,
impl<E> Encode for ServerFnError<E>where
E: Encode,
Source§impl<E> Error for ServerFnError<E>where
E: Error,
impl<E> Error for ServerFnError<E>where
E: Error,
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<E> Freeze for ServerFnError<E>where
E: Freeze,
impl<E> RefUnwindSafe for ServerFnError<E>where
E: RefUnwindSafe,
impl<E> Send for ServerFnError<E>where
E: Send,
impl<E> Sync for ServerFnError<E>where
E: Sync,
impl<E> Unpin for ServerFnError<E>where
E: Unpin,
impl<E> UnsafeUnpin for ServerFnError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for ServerFnError<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
Mutably borrows from an owned value. Read more