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:
Evan Almloff authored and GitHub committed 2025-06-20 18:37:51 -07:00
1 parent 67f717647f
commit f610c6b8c1
20 files changed
+316 -96

No files matched your search

+2 -2
View File
@@ -58,7 +58,7 @@ fn App() -> Element {
}
#[server]
async fn get_meaning(of: String) -> Result<Option<u32>, ServerFnError> {
async fn get_meaning(of: String) -> ServerFnResult<Option<u32>> {
Ok(of.contains("life").then(|| 42))
}
```
@@ -131,7 +131,7 @@ fn App() -> Element {
}
#[server]
async fn get_meaning(of: String) -> Result<Option<u32>, ServerFnError> {
async fn get_meaning(of: String) -> ServerFnResult<Option<u32>> {
Ok(of.contains("life").then(|| 42))
}
```