serverless-fn 0.1.0

A Rust library for simplifying serverless function development and invocation
Documentation
//! Serverless Function Library
//!
//! A Rust library that simplifies the development and invocation of serverless functions.
//! Allows calling serverless functions as if they were ordinary functions,
//! with deployment strategy determined by crate feature flags.
//!
//! # Features
//!
//! - **Simplified Interface**: Same syntax as regular function calls
//! - **Smart Deployment**: Automatic deployment strategy based on feature flags
//! - **Local Debugging**: Test without actual deployment
//! - **Type Safety**: Compile-time type checking for parameters and return values
//!
//! # Example
//!
//! ```rust,no_run
//! use serverless_fn::{serverless, ServerlessError};
//! use serde::{Serialize, Deserialize};
//!
//! #[derive(Serialize, Deserialize, Debug)]
//! pub struct Post {
//!     pub id: u64,
//!     pub title: String,
//!     pub content: String,
//! }
//!
//! #[serverless]
//! pub async fn read_posts(how_many: usize, query: String) -> Result<Vec<Post>, ServerlessError> {
//!     Ok((0..how_many)
//!         .map(|i| Post {
//!             id: i as u64,
//!             title: format!("Post {}", i),
//!             content: format!("Content of post {}", i),
//!         })
//!         .collect())
//! }
//! ```
//!
//! # Feature Flags
//!
//! - `remote_call`: Enable remote invocation mode (default)
//! - `local_call`: Enable local function call mode
//! - `json_serialization`: Use JSON serialization (default)
//! - `postcard_serialization`: Use Postcard serialization
//! - `mock_server`: Enable mock server for testing
//! - `telemetry`: Enable telemetry and monitoring

#![warn(missing_docs)]
#![warn(rustdoc::missing_crate_level_docs)]

pub mod client;
pub mod config;
pub mod error;
pub mod serializer;
pub mod server;
pub mod telemetry;
pub mod transport;

// Re-export macros
pub use serverless_fn_macro::serverless;

// Re-export commonly used types
pub use error::ServerlessError;
pub use server::FunctionServer;

// Re-export server components
pub use server::{FunctionHandler, FunctionRegistry, ServerConfig};

pub use transport::http::HttpTransport;

// Re-export config types
pub use config::{Config, ConfigBuilder, DeployStrategy};