Skip to main content

Crate greynet

Crate greynet 

Source
Expand description

This crate implements the core foundation types for the Greynet constraint satisfaction engine, translated from Python to Rust.

Re-exports§

pub use analysis::ConstraintAnalysis;
pub use analysis::ConstraintViolationReport;
pub use analysis::NetworkStatistics;
pub use collectors::BaseCollector;
pub use collectors::Collectors;
pub use constraint::ConstraintWeights;
pub use constraint_builder::ConstraintBuilder;
pub use error::GreynetError;
pub use error::Result;
pub use fact::GreynetFact;
pub use joiner::Comparator;
pub use joiner::JoinerType;
pub use joiner::RangeUtils;
pub use resource_limits::ResourceLimits;
pub use score::FromHard;
pub use score::FromMedium;
pub use score::FromSimple;
pub use score::FromSoft;
pub use score::HardMediumSoftScore;
pub use score::HardSoftScore;
pub use score::Score;
pub use score::SimpleScore;
pub use session::Session;
pub use state::TupleState;
pub use stream_def::extract_fact;
pub use stream_def::Arity1;
pub use stream_def::Arity2;
pub use stream_def::Arity3;
pub use stream_def::Arity4;
pub use stream_def::Arity5;
pub use stream_def::ConstraintRecipe;
pub use stream_def::Stream;
pub use tuple::AnyTuple;
pub use tuple::BiTuple;
pub use tuple::FactIterator;
pub use tuple::PentaTuple;
pub use tuple::QuadTuple;
pub use tuple::TriTuple;
pub use tuple::TupleArity;
pub use tuple::UniTuple;
pub use utils::TupleUtils;

Modules§

advanced_index
analysis
arena
collectors
common_ops
constraint
constraint_builder
error
Error types for the Greynet constraint satisfaction engine
fact
fact_impls
factory
join_adapters
joiner
node_operations
node_sharing
Fixed node_sharing.rs with proper trait bounds
nodes
packed_indices
prelude
A “prelude” module for easily importing the most commonly used types.
resource_limits
Resource management and limits for the Greynet engine
scheduler
score
session
state
stream_def
tuple
uni_index
utils

Macros§

assert_no_leaks
A macro for asserting that no memory leaks (e.g., dangling tuples) exist in the tuple arena during debug builds.
greynet_fact_for_struct
impl_any_tuple_accessors
A macro to generate boilerplate accessor methods for AnyTuple, ensuring efficient, inlined implementations for each tuple variant.

Functions§

builder
Convenience function to create a new constraint builder with default limits.
builder_with_limits
Convenience function to create a constraint builder with custom resource limits.