Skip to main content

oxilean_runtime/rc/
stickyrc_traits.rs

1//! # StickyRc - Trait Implementations
2//!
3//! This module contains trait implementations for `StickyRc`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//! - `Display`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use super::types::StickyRc;
13use std::fmt;
14
15impl Default for StickyRc {
16    fn default() -> Self {
17        Self::new(1, u32::MAX)
18    }
19}
20
21impl std::fmt::Display for StickyRc {
22    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23        write!(f, "StickyRc({}/{})", self.count, self.max)
24    }
25}