dx-test/server/src/lib.rs

19 lines
441 B
Rust
Raw Normal View History

2025-04-07 12:17:09 -05:00
//! This crate contains all shared fullstack server functions.
use dioxus::{logger::tracing::debug, prelude::*};
/// Echo the user input on the server.
#[server(Echo)]
pub async fn echo(input: String) -> Result<String, ServerFnError> {
Ok(input)
}
#[server]
pub async fn test_fn() -> Result<(), ServerFnError> {
debug!("Here");
#[cfg(feature = "server")]
{
debug!("This is only on the server.");
}
Ok(())
}