What problem does it solve?
This Skill provides a robust way to define and manage server-side functions in pocopine using Rust's proc-macros, ensuring secure access policies and efficient asynchronous communication with the client.
Core Features & Use Cases
- Typed Server Functions: Create and manage server-side functions using Rust syntax with support for typed JSON communication.
- Access Policies: Implement access policies with guards to secure endpoints and enforce access control.
- Asynchronous Calls: Facilitate asynchronous state updates in the wasm client using the
dispatch! macro.
- Use Case: Ideal for developing pocopine applications that require server-side processing, such as handling user authentication, performing database queries, or calling external APIs.
Quick Start
Define a server function using the #[server] macro and specify your access policy, then call it with dispatch!(function().await, |s, result| { /* update state */ }).