| Crates.io | emixcore |
| lib.rs | emixcore |
| version | 0.6.0 |
| created_at | 2026-01-11 14:02:02.470583+00 |
| updated_at | 2026-01-11 14:02:02.470583+00 |
| description | Shared error handling, debug configuration, and foundational traits for EssentialMix. |
| homepage | |
| repository | https://github.com/asm2025/essentialmix-rs |
| max_upload_size | |
| id | 2035856 |
| size | 12,616 |
emixcore provides the shared error type, debug configuration toggle, and core
traits that the other EssentialMix crates build upon.
Error wraps workspace-specific failures while implementing std::error::Error.Result<T> aliases std::result::Result<T, Error>.set_debug / is_debug flip a global once-initialized flag used by helper
crates.system::num_cpus() respects the debug flag to make deterministic unit tests
easier (returns 1 CPU when debug mode is active).CallbackHandler<T> is a lightweight observer trait for progress reporting.use emixcore::{set_debug, system, CallbackHandler};
struct Logger;
impl CallbackHandler<u64> for Logger {
fn starting(&self) { println!("Starting"); }
fn update(&self, progress: u64) { println!("Progress: {progress}%"); }
fn completed(&self) { println!("Done"); }
}
fn main() {
set_debug(true);
assert_eq!(system::num_cpus(), 1);
}
Consult src/errors.rs for the detailed error taxonomy and tests/ for
real-world integration coverage.