| Crates.io | icentral-operation |
| lib.rs | icentral-operation |
| version | 0.1.0 |
| created_at | 2025-04-04 22:34:02.520879+00 |
| updated_at | 2025-04-04 22:34:02.520879+00 |
| description | A Rust crate that defines an enum for basic operations including insertion and deletion, with essential utilities for operation management. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1620881 |
| size | 49,288 |
The icentral-operation crate provides an enumerative representation of fundamental operations: Insertion and Deletion. Designed with simplicity and performance in mind, this library is ideal for any system that requires robust handling of these operations, such as database engines, text editors, or command-line interfaces.
Insertion and Deletion operations using Rust enums.Copy, Clone, Default, Debug, PartialEq, and Eq ensure seamless integration into applications requiring cloning and comparison of operations.is_deletion() and is_insertion() offer quick checks on the operation types.To employ icentral-operation in your project, add it as a dependency in your Cargo.toml:
[dependencies]
icentral-operation = "0.1.0"
Here is a simple example to get started:
use icentral_operation::Operation;
fn process_operation(op: Operation) {
if op.is_insertion() {
println!("Performing insertion operation");
} else if op.is_deletion() {
println!("Performing deletion operation");
}
}
fn main() {
let insert_op = Operation::Insertion;
let delete_op = Operation::Deletion;
process_operation(insert_op);
process_operation(delete_op);
}
This crate benefits from Rust's ownership system, guaranteeing memory safety and preventing data races. Optimized for performance, icentral-operation leverages Rust's zero-cost abstractions to minimize runtime overhead.
Contributions are welcome! Please ensure your code adheres to the Rust community coding standards.
This README was generated by an AI model. It strives to be accurate and helpful, but may not capture every nuance of the crate's capabilities.
This crate is in the process of being translated from c++ to rust. Currently, it still needs exhaustive testing. It is likely there currently exist many glitches which need to be fixed before proper usage. This crate is based on the original icentral program developed by Fuad Jamor. Please see the following repository for details: https://github.com/fjamour/icentral.
For progress updates, see the workspacer rust project.