Skip to main content

oxilean_runtime/scheduler/
sharedstate_traits.rs

1//! # SharedState - Trait Implementations
2//!
3//! This module contains trait implementations for `SharedState`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//! - `Debug`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use std::fmt;
13use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
14
15use super::types::SharedState;
16
17impl Default for SharedState {
18    fn default() -> Self {
19        Self::new()
20    }
21}
22
23impl fmt::Debug for SharedState {
24    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
25        f.debug_struct("SharedState")
26            .field("shutdown", &self.should_shutdown())
27            .field("task_counter", &self.task_counter.load(Ordering::Relaxed))
28            .finish()
29    }
30}