Skip to main content

oxilean_codegen/opt_reuse/
reuseallockind_traits.rs

1//! # ReuseAllocKind - Trait Implementations
2//!
3//! This module contains trait implementations for `ReuseAllocKind`.
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::ReuseAllocKind;
14use std::fmt;
15
16impl std::fmt::Display for ReuseAllocKind {
17    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18        match self {
19            ReuseAllocKind::Heap => write!(f, "heap"),
20            ReuseAllocKind::Stack => write!(f, "stack"),
21            ReuseAllocKind::Scratch => write!(f, "scratch"),
22            ReuseAllocKind::Static => write!(f, "static"),
23            ReuseAllocKind::Inline => write!(f, "inline"),
24        }
25    }
26}