pakem 1.0.3

A beautiful, fast, and elegant web framework for Rust — Look like Laravel, Run at Rust Speed
Documentation
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct CameraConfig {
    pub device_id: Option<String>,
    pub facing_mode: String, // "user" (front) or "environment" (rear)
    pub resolution_width: u32,
    pub resolution_height: u32,
    pub enable_torch: bool,
}

impl Default for CameraConfig {
    fn default() -> Self {
        Self {
            device_id: None,
            facing_mode: "environment".to_string(),
            resolution_width: 1280,
            resolution_height: 720,
            enable_torch: false,
        }
    }
}