Skip to main content

Crate finit

Crate finit 

Source
Expand description

A library for working with sets, their relationships and operations.

The main traits are:

  • Set - the most basic trait that all sets must implement to be able to use operations and comparisons, since most require them.

§Operations

§Comparisons

FeatureDescription
std (default)Adds support for std::collections::HashMap and std::collections::BTreeMap as well as adds the types collections::WildcardBTreeMap and collections::WildcardHashMap.
deriveAdds derive macros for operations and comparisons.
serdeAdds serde::Serialize and serde::Deserialize support for built-in types.
phfAdds operations between phf::Map, phf::OrderedMap and std::collections maps.

This library was originally designed to create a permission system, but it can be used for any kind of system that requires set-based data structures.

Modules§

collections
This module contains various collection types that can be used with the traits defined in this crate, such as WildcardHashMap and WildcardBTreeMap.
comparisons
This module contains traits for comparing sets, such as checking if two sets are equal, if one set is a subset of another, etc.
operations
This module contains traits for performing operations on sets, such as Union, Intersection, Difference, DisjunctiveUnion, etc.

Macros§

impl_map
impl_map_comparisons
impl_map_owned_operations
impl_map_ref_operations
set_eq_partial_eq_impl
A helper macro to implement SetEq for types that also implement PartialEq, since in many cases they will be the same.
subset_of_intersection_identity_impl

Traits§

Set
The most basic trait that all sets often must implement to be able to use operations and comparisons, since most require them.

Derive Macros§

Set