xxor

Crates.ioxxor
lib.rsxxor
version0.1.0
created_at2025-06-02 20:45:49.964531+00
updated_at2025-06-02 20:45:49.964531+00
descriptionAn enum for expressing two valid outcomes: XOR means one or the other, never both.
homepage
repositoryhttps://github.com/snqre/xxor/
max_upload_size
id1698363
size5,213
Marco Bizzaro (snqre)

documentation

README

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"
Commit count: 3

cargo fmt