Skip to main content

oxilean_codegen/opt_alias/
aliasversioninfo_traits.rs

1//! # AliasVersionInfo - Trait Implementations
2//!
3//! This module contains trait implementations for `AliasVersionInfo`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//! - `Display`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use super::types::AliasVersionInfo;
13use std::fmt;
14
15impl Default for AliasVersionInfo {
16    fn default() -> Self {
17        Self {
18            pass_version: 2,
19            supports_tbaa: true,
20            supports_field_sensitivity: false,
21            supports_context_sensitivity: false,
22            default_level: "andersen".to_string(),
23        }
24    }
25}
26
27impl std::fmt::Display for AliasVersionInfo {
28    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29        write!(
30            f,
31            "AliasVersionInfo {{ v={}, tbaa={}, field={}, ctx={}, level={} }}",
32            self.pass_version,
33            self.supports_tbaa,
34            self.supports_field_sensitivity,
35            self.supports_context_sensitivity,
36            self.default_level,
37        )
38    }
39}