oxilean-runtime 0.1.2

OxiLean runtime - Memory management, closures, I/O, and task scheduling
Documentation
//! # TaskAffinity - Trait Implementations
//!
//! This module contains trait implementations for `TaskAffinity`.
//!
//! ## Implemented Traits
//!
//! - `Display`
//!
//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)

use super::types::{TaskAffinity, Worker};
use std::fmt;

impl fmt::Display for TaskAffinity {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            TaskAffinity::Any => write!(f, "any"),
            TaskAffinity::Worker(w) => write!(f, "worker#{}", w),
            TaskAffinity::Prefer(w) => write!(f, "prefer#{}", w),
            TaskAffinity::MainThread => write!(f, "main"),
        }
    }
}