oxilean_codegen/ffi_bridge/ffistructfield_traits.rs
1//! # FfiStructField - Trait Implementations
2//!
3//! This module contains trait implementations for `FfiStructField`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use crate::lcnf::*;
12
13use super::types::FfiStructField;
14use std::fmt;
15
16impl std::fmt::Display for FfiStructField {
17 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18 if let Some(bw) = self.bit_width {
19 write!(f, "{} {} : {}", self.field_type, self.name, bw)
20 } else {
21 write!(f, "{} {}", self.field_type, self.name)
22 }
23 }
24}