xxor 0.1.0

An enum for expressing two valid outcomes: XOR<This, That> means one or the other, never both.
Documentation
  • Coverage
  • 7.69%
    1 out of 13 items documented1 out of 10 items with examples
  • Size
  • Source code size: 4.72 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 945.98 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • snqre/xxor
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • snqre

XXOR

XOR<This, That> — for when both outcomes are valid, and either is okay.


Where Option<T> means maybe, and Result<T, E> means success or error,
XOR<This, That> means two possible success outcomes — without the noise of errors or missing values.


✨ Features

  • XOR<This, That>: holds either This(A) or That(B).
  • 🧼 Clean, focused API (map_this, map_that, unwrap_*, etc.).
  • 🔒 #![no_std] compatible.
  • 🧪 Derives Debug, Clone, Eq, and PartialEq.
  • 🎯 Perfect for avoiding new enums in small, focused cases.

📦 Installation

Add to your Cargo.toml:

[dependencies]
xxor = "0.1.0"