server_fn 0.8.7

RPC for any web framework.
Documentation
error[E0277]: () is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
 --> tests/invalid/empty_return.rs:3:1
  |
3 | #[server]
  | ^^^^^^^^^ Must return a `Result` or aliased `Result`.
  |
  = help: the trait `ServerFnMustReturnResult` is not implemented for `()`
  = note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
  = help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`
  = note: this error originates in the attribute macro `server` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: () is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
 --> tests/invalid/empty_return.rs:3:1
  |
3 | #[server]
  | ^^^^^^^^^ Must return a `Result` or aliased `Result`.
  |
  = help: the trait `ServerFnMustReturnResult` is not implemented for `()`
  = note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
  = help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`

error[E0271]: expected `impl Future<Output = ()>` to be a future that resolves to `Result<_, _>`, but it resolves to `()`
 --> tests/invalid/empty_return.rs:3:1
  |
3 | #[server]
  | ^^^^^^^^^ expected `Result<_, _>`, found `()`
  |
  = note:   expected enum `Result<_, _>`
          found unit type `()`
note: required by a bound in `ServerFn::run_body::{anon_assoc#0}`
 --> src/lib.rs
  |
  |     ) -> impl Future<Output = Result<Self::Output, Self::Error>> + Send;
  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ServerFn::run_body::{anon_assoc#0}`

error[E0277]: () is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
 --> tests/invalid/empty_return.rs:3:1
  |
3 | #[server]
  | ^^^^^^^^^ Must return a `Result` or aliased `Result`.
  |
  = help: the trait `ServerFnMustReturnResult` is not implemented for `()`
  = note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
  = help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`

error[E0308]: mismatched types
 --> tests/invalid/empty_return.rs:3:1
  |
3 | #[server]
  | ^^^^^^^^^ expected `()`, found `Result<_, _>`
  |
  = note: expected unit type `()`
                  found enum `Result<_, _>`
help: consider using `Result::expect` to unwrap the `Result<_, _>` value, panicking if the value is a `Result::Err`
  |
3 | #[server].expect("REASON")
  |          +++++++++++++++++