Implement Into<CaptureError> for the default server function error type (#4205)
* implement Into<CaptureError> for the server function error type * document the server function error type * fix tests
This commit is contained in:
1 parent
67f717647f
commit
f610c6b8c1
20 files changed
+316
-96
No files matched your search
@@ -83,7 +83,7 @@ pub struct Content {
|
||||
}
|
||||
|
||||
#[server]
|
||||
async fn server_content(id: usize) -> Result<Content, ServerFnError> {
|
||||
async fn server_content(id: usize) -> ServerFnResult<Content> {
|
||||
let content_tree = [
|
||||
Content {
|
||||
title: "The robot says hello world".to_string(),
|
||||
|
||||
@@ -25,6 +25,6 @@ fn main() {
|
||||
}
|
||||
|
||||
#[server(endpoint = "static_routes")]
|
||||
async fn static_routes() -> Result<Vec<String>, ServerFnError> {
|
||||
async fn static_routes() -> ServerFnResult<Vec<String>> {
|
||||
Ok(vec!["/".to_string()])
|
||||
}
|
||||
Reference in new issue
Block a user