Skip to main content

oxilean_codegen/js_backend/
jsbackendconfig_traits.rs

1//! # JsBackendConfig - Trait Implementations
2//!
3//! This module contains trait implementations for `JsBackendConfig`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//! - `Display`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use crate::lcnf::*;
13
14use super::types::{JsBackendConfig, JsModuleFormat};
15use std::fmt;
16
17impl Default for JsBackendConfig {
18    fn default() -> Self {
19        JsBackendConfig {
20            use_bigint_for_nat: true,
21            strict_mode: false,
22            include_runtime: true,
23            emit_jsdoc: false,
24            module_format: JsModuleFormat::Es,
25            minify: false,
26        }
27    }
28}
29
30impl fmt::Display for JsBackendConfig {
31    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
32        write!(
33            f,
34            "JsBackendConfig {{ bigint={}, strict={}, runtime={}, minify={} }}",
35            self.use_bigint_for_nat, self.strict_mode, self.include_runtime, self.minify,
36        )
37    }
38}