18 lines
441 B
Rust
18 lines
441 B
Rust
//! 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(())
|
|
}
|