Skip to content

Main - #3

Merged
JoshuaKento merged 5 commits into
masterfrom
main
Oct 9, 2025
Merged

Main#3
JoshuaKento merged 5 commits into
masterfrom
main

Conversation

@JoshuaKento

@JoshuaKento JoshuaKento commented Oct 9, 2025

Copy link
Copy Markdown
Owner

User description

fundamental logic fixes, prepared crate metadata for publication


PR Type

Enhancement, Bug fix, Tests, Documentation


Description

• Complete implementation of a Rust fuzzy logic library with Mamdani inference system
• Added comprehensive membership functions (Gaussian, triangular, trapezoidal) with validation
• Implemented fuzzy operators with multiple families (Min-Max, Product, Łukasiewicz)
• Created rule evaluation system with antecedent AST and Min-Max operators
• Added aggregation and defuzzification methods with centroid of area algorithm
• Fixed API consistency issues: renamed defuzzificate to defuzzify, updated function signatures to use references
• Added comprehensive error handling system with context-specific error types
• Included end-to-end integration tests and batch evaluation benchmarks
• Generated complete documentation with search functionality
• Prepared crate metadata for publication with proper module structure


Diagram Walkthrough

flowchart LR
  A["Input Variables"] --> B["Membership Functions"]
  B --> C["Fuzzy Rules"]
  C --> D["Antecedent Evaluation"]
  D --> E["Rule Activation"]
  E --> F["Aggregation"]
  F --> G["Defuzzification"]
  G --> H["Crisp Output"]
  I["Fuzzy Operators"] --> D
  J["Error Handling"] --> B
  J --> C
  J --> D
Loading

File Walkthrough

Relevant files
Enhancement
18 files
evaluate.rs
Batch evaluation benchmark script for fuzzy systems           

target/package/rust-fuzzylogic-0.1.0/benches/evaluate.rs

• Added comprehensive batch evaluation script for fuzzy systems

Implements CLI interface for grid-based or CSV-based input evaluation

• Includes system construction with temperature input and fan/pump
speed outputs
• Provides command-line argument parsing for
customizable evaluation parameters

+326/-0 
antecedent.rs
Antecedent evaluation system with Min-Max operators           

target/package/rust-fuzzylogic-0.1.0/src/antecedent.rs

• Implements antecedent AST for fuzzy rule evaluation
• Provides
eval_antecedent function using Min-Max operator family
• Supports AND,
OR, NOT, and atomic predicates in rule antecedents
• Includes
comprehensive unit tests for antecedent behavior

+183/-0 
variable.rs
Crisp variable implementation with fuzzy terms                     

target/package/rust-fuzzylogic-0.1.0/src/variable.rs

• Defines Variable struct with domain bounds and named fuzzy terms

Implements term insertion with duplicate prevention and validation

Provides membership evaluation by term name with domain checking

Includes comprehensive unit tests for variable API

+180/-0 
ops.rs
Fuzzy logic operators with multiple family implementations

target/package/rust-fuzzylogic-0.1.0/src/ops.rs

• Defines FuzzyOps trait for T-norm, S-norm, and complement operations

• Implements multiple operator families (Min-Max, Product,
Łukasiewicz)
• Provides both feature-gated static and dynamic operator
implementations
• Includes unit tests for all operator family
behaviors

+164/-0 
sampler.rs
Uniform domain sampling implementation                                     

target/package/rust-fuzzylogic-0.1.0/src/sampler.rs

• Implements Sampler trait and UniformSampler struct
• Provides
uniform domain sampling with configurable point count
• Includes
validation for minimum sample size and finite bounds
• Contains
comprehensive unit tests for sampling behavior

+123/-0 
mamdani.rs
Mamdani fuzzy rule implementation                                               

target/package/rust-fuzzylogic-0.1.0/src/mamdani.rs

• Implements Mamdani rule structure with antecedent and consequent

Provides rule activation and implication methods
• Supports
feature-gated Mamdani inference engine
• Uses clipping implication
with uniform sampling

+92/-0   
trapezoidal.rs
Trapezoidal membership function implementation                     

target/package/rust-fuzzylogic-0.1.0/src/membership/trapezoidal.rs

• Implements trapezoidal membership function with four control points

• Provides parameter validation ensuring proper ordering
• Includes
membership evaluation with slope calculations
• Contains unit tests
for trapezoidal function behavior

+71/-0   
triangular.rs
Triangular membership function implementation                       

target/package/rust-fuzzylogic-0.1.0/src/membership/triangular.rs

• Implements triangular membership function with three control points

• Provides parameter validation and membership evaluation
• Uses slope
helper function for linear interpolation
• Includes comprehensive unit
tests

+64/-0   
rulespace.rs
Fuzzy rule space container implementation                               

target/package/rust-fuzzylogic-0.1.0/src/rulespace.rs

• Implements container for fuzzy variables, rules, and membership data

• Provides aggregation and defuzzification methods
• Uses
std::mem::take for rule ownership management
• Includes rule addition
functionality

+66/-0   
error.rs
Comprehensive error handling system                                           

target/package/rust-fuzzylogic-0.1.0/src/error.rs

• Defines comprehensive error types for fuzzy logic operations

Implements Display and Error traits for proper error handling

Provides MissingSpace enum for context-specific errors
• Includes unit
tests for error message formatting

+67/-0   
gaussian.rs
Gaussian membership function implementation                           

target/package/rust-fuzzylogic-0.1.0/src/membership/gaussian.rs

• Implements Gaussian membership function with mean and standard
deviation
• Provides validation for positive standard deviation values

• Pre-calculates constants for performance optimization
• Includes
unit tests for Gaussian function behavior

+58/-0   
term.rs
Term wrapper for labeled membership functions                       

target/package/rust-fuzzylogic-0.1.0/src/term.rs

• Implements Term wrapper for labeled membership functions
• Uses
boxed trait objects for dynamic membership function storage
• Provides
name accessor and evaluation delegation
• Includes unit tests for term
functionality

+54/-0   
mod.rs
Membership function trait and utilities                                   

target/package/rust-fuzzylogic-0.1.0/src/membership/mod.rs

• Defines MembershipFn trait for membership function evaluation

Provides validation helpers for parameter ordering
• Implements slope
calculation utility function
• Re-exports membership function types
for convenience

+42/-0   
aggregate.rs
Rule aggregation with pointwise maximum                                   

target/package/rust-fuzzylogic-0.1.0/src/aggregate.rs

• Implements rule aggregation using pointwise maximum combination

Provides elements_max helper for membership vector combination

Processes all rules to build output membership functions
• Uses
HashMap for efficient consequent variable grouping

+38/-0   
defuzz.rs
Centroid defuzzification implementation                                   

target/package/rust-fuzzylogic-0.1.0/src/defuzz.rs

• Implements centroid of area defuzzification method
• Processes
aggregated membership samples into crisp outputs
• Uses uniform step
calculation across variable domains
• Returns HashMap mapping variable
names to defuzzified values

+31/-0   
prelude.rs
Prelude module for convenient imports                                       

target/package/rust-fuzzylogic-0.1.0/src/prelude.rs

• Provides convenient re-exports for common fuzzy logic types

Includes core scalar types, error handling, and membership functions

Re-exports fuzzy operators and sampling functionality
• Simplifies
imports for library users

+29/-0   
lib.rs
Main library module with feature configuration                     

target/package/rust-fuzzylogic-0.1.0/src/lib.rs

• Declares all library modules and public interfaces
• Implements
conditional compilation for float precision features
• Provides type
aliases for Float based on feature flags
• Includes optional serde
support for serialization

+31/-0   
search-92309212.js
Add comprehensive documentation search JavaScript functionality

target/doc/static.files/search-92309212.js

• Added complete JavaScript search functionality for Rust
documentation
• Implemented fuzzy search algorithms with edit distance
calculations
• Added type signature matching and filtering
capabilities
• Included search result rendering and navigation
features

+6/-0     
Tests
2 files
mamdani_tests.rs
End-to-end Mamdani inference integration test                       

target/package/rust-fuzzylogic-0.1.0/tests/mamdani_tests.rs

• Adds end-to-end integration test for Mamdani fuzzy inference
• Tests
complete pipeline from variable creation to defuzzification
• Uses
temperature control system with fan and pump speed outputs
• Validates
aggregation and defuzzification functionality

+126/-0 
mamdani_tests.rs
Test updates for API compatibility                                             

tests/mamdani_tests.rs

• Renamed test function from implication_to_defuzz_test to
end_to_end_test
• Updated function calls to use references for
aggregation and defuzzification
• Maintained existing test logic and
assertions
• Fixed API compatibility with updated function signatures

+3/-3     
Bug fix
3 files
rulespace.rs
RuleSpace API improvements and validation fixes                   

src/rulespace.rs

• Fixed constructor to return Result with validation for empty inputs

• Changed defuzzificate method name to defuzzify for consistency

Updated method signatures to use references instead of owned values

Renamed myu field to agg_memberships for clarity

+23/-19 
defuzz.rs
Defuzzification function signature and naming improvements

src/defuzz.rs

• Updated function signature to use reference instead of owned HashMap

• Renamed variables from myu to agg_memberships for clarity
• Fixed
result insertion to use to_string() for key conversion
• Maintained
centroid of area defuzzification algorithm

+6/-6     
aggregate.rs
Aggregation function signature improvements                           

src/aggregate.rs

• Changed rules parameter from owned Vec to slice reference &[Rule]

Updated sampler parameter to use reference &UniformSampler

Maintained existing aggregation logic and functionality
• Improved
memory efficiency by avoiding unnecessary moves

+2/-2     
Dependencies
1 files
librust_fuzzylogic-0c4832f285c69729.rmeta
Compiled Rust library metadata file addition                         

target/debug/deps/librust_fuzzylogic-0c4832f285c69729.rmeta

• Added compiled Rust metadata file for the fuzzy logic library

Contains binary metadata for crate dependencies and module structure

Includes serialized information about membership functions, variables,
terms, and error handling

[link]   
Documentation
2 files
SourceSerif4-LICENSE-a2cfd9d5.md
Font license documentation for SourceSerif4                           

target/doc/static.files/SourceSerif4-LICENSE-a2cfd9d5.md

• Added SIL Open Font License Version 1.1 for SourceSerif4 font

Contains copyright information for Adobe's Source font family

Includes complete license terms and conditions for font usage

+98/-0   
index.html
Add membership module documentation HTML page                       

target/doc/rust_fuzzylogic/membership/index.html

• Added HTML documentation page for the membership module
• Included
navigation sidebar with module structure
• Added re-exports for
Gaussian and Triangular membership functions
• Listed submodules:
gaussian, trapezoidal, triangular

+1/-0     
Additional files
101 files
Cargo.toml +1/-0     
.rustc_info.json +1/-0     
.rustdoc_fingerprint.json +1/-0     
CACHEDIR.TAG +3/-0     
.cargo-lock [link]   
dep-lib-crossbeam_deque [link]   
invoked.timestamp +1/-0     
lib-crossbeam_deque +1/-0     
lib-crossbeam_deque.json +1/-0     
dep-lib-crossbeam_deque [link]   
invoked.timestamp +1/-0     
lib-crossbeam_deque +1/-0     
lib-crossbeam_deque.json +1/-0     
dep-lib-crossbeam_epoch [link]   
invoked.timestamp +1/-0     
lib-crossbeam_epoch +1/-0     
lib-crossbeam_epoch.json +1/-0     
dep-lib-crossbeam_epoch [link]   
invoked.timestamp +1/-0     
lib-crossbeam_epoch +1/-0     
lib-crossbeam_epoch.json +1/-0     
build-script-build-script-build +1/-0     
build-script-build-script-build.json +1/-0     
dep-build-script-build-script-build [link]   
invoked.timestamp +1/-0     
run-build-script-build-script-build +1/-0     
run-build-script-build-script-build.json +1/-0     
dep-lib-crossbeam_utils [link]   
invoked.timestamp +1/-0     
lib-crossbeam_utils +1/-0     
lib-crossbeam_utils.json +1/-0     
dep-lib-crossbeam_utils [link]   
invoked.timestamp +1/-0     
lib-crossbeam_utils +1/-0     
lib-crossbeam_utils.json +1/-0     
dep-lib-either [link]   
invoked.timestamp +1/-0     
lib-either +1/-0     
lib-either.json +1/-0     
dep-lib-either [link]   
invoked.timestamp +1/-0     
lib-either +1/-0     
lib-either.json +1/-0     
run-build-script-build-script-build +1/-0     
run-build-script-build-script-build.json +1/-0     
dep-lib-proc_macro2 [link]   
invoked.timestamp +1/-0     
lib-proc_macro2 +1/-0     
lib-proc_macro2.json +1/-0     
build-script-build-script-build +1/-0     
build-script-build-script-build.json +1/-0     
dep-build-script-build-script-build [link]   
invoked.timestamp +1/-0     
dep-lib-quote [link]   
invoked.timestamp +1/-0     
lib-quote +1/-0     
lib-quote.json +1/-0     
dep-lib-rayon [link]   
invoked.timestamp +1/-0     
lib-rayon +1/-0     
lib-rayon.json +1/-0     
dep-lib-rayon [link]   
invoked.timestamp +1/-0     
lib-rayon +1/-0     
lib-rayon.json +1/-0     
build-script-build-script-build +1/-0     
build-script-build-script-build.json +1/-0     
dep-build-script-build-script-build [link]   
invoked.timestamp +1/-0     
run-build-script-build-script-build +1/-0     
run-build-script-build-script-build.json +1/-0     
dep-lib-rayon_core [link]   
invoked.timestamp +1/-0     
lib-rayon_core +1/-0     
lib-rayon_core.json +1/-0     
dep-lib-rayon_core [link]   
invoked.timestamp +1/-0     
lib-rayon_core +1/-0     
lib-rayon_core.json +1/-0     
dep-test-bin-rust-fuzzylogic [link]   
invoked.timestamp +1/-0     
test-bin-rust-fuzzylogic +1/-0     
test-bin-rust-fuzzylogic.json +1/-0     
dep-lib-rust_fuzzylogic [link]   
invoked.timestamp +1/-0     
lib-rust_fuzzylogic +1/-0     
lib-rust_fuzzylogic.json +1/-0     
output-lib-rust_fuzzylogic +2/-0     
dep-lib-rust_fuzzylogic [link]   
invoked.timestamp +1/-0     
lib-rust_fuzzylogic +1/-0     
lib-rust_fuzzylogic.json +1/-0     
dep-lib-rust_fuzzylogic [link]   
invoked.timestamp +1/-0     
lib-rust_fuzzylogic +1/-0     
lib-rust_fuzzylogic.json +1/-0     
dep-lib-rust_fuzzylogic [link]   
invoked.timestamp +1/-0     
lib-rust_fuzzylogic +1/-0     
lib-rust_fuzzylogic.json +1/-0     
Additional files not shown

Introduces a standalone batch evaluation script under benches/evaluate.rs for the rust-fuzzylogic crate, allowing grid and CSV input evaluation. Removes the empty tests/end_to_end.rs file.
Changed repository and homepage URLs in Cargo.toml and README.md to point to the correct GitHub user. Removed the 'end_to_end' test from Cargo.toml. Added a new batch evaluation script under benches/evaluate.rs for evaluating fuzzy systems over grids or CSV inputs. Fixed import order in several modules for consistency.
updated faulty logic of defuzz.rs, rulespace.rs, aggregate.rs where the Rules would be erased after borrow and fixed mamdani_test.rs accordingly.
Deleting unnecessary bloat files
@JoshuaKento
JoshuaKento merged commit b34ef61 into master Oct 9, 2025
0 of 2 checks passed
@qodo-code-review

Copy link
Copy Markdown

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Third-party asset load

Description: Preloading external font assets via dynamically injected link tags in generated
documentation may allow mixed-content or tracking if hosted over HTTP(S) without CSP;
ensure docs hosting enforces HTTPS and CSP to mitigate resource injection/tracking.
enum.FuzzyError.html [1-27]

Referred Code
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Basic errors that can occur in the rust-fuzzylogic library"><title>FuzzyError in rust_fuzzylogic::error - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-84e720fa.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rust_fuzzylogic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.89.0 (29483883e 2025-08-04)" data-channel="1.89.0" data-search-js="search-92309212.js" data-settings-js="settings-5514c975.js" ><script src="../../static.files/storage-4e99c027.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-fd3af306.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rust_fuzzylogic/index.html">rust_<wbr>fuzzylogic</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Fuzzy<wbr>Error</a></h2><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.BadArity" title="BadArity">BadArity</a></li><li><a href="#variant.EmptyInput" title="EmptyInput">EmptyInput</a></li><li><a href="#variant.NotFound" title="NotFound">NotFound</a></li><li><a href="#variant.OutOfBounds" title="OutOfBounds">OutOfBounds</a></li><li><a href="#variant.TypeMismatch" title="TypeMismatch">TypeMismatch</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-FuzzyError" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-FuzzyError" title="Debug">Debug</a></li><li><a href="#impl-Display-for-FuzzyError" title="Display">Display</a></li><li><a href="#impl-Eq-for-FuzzyError" title="Eq">Eq</a></li><li><a href="#impl-Error-for-FuzzyError" title="Error">Error</a></li><li><a href="#impl-Hash-for-FuzzyError" title="Hash">Hash</a></li><li><a href="#impl-PartialEq-for-FuzzyError" title="PartialEq">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-FuzzyError" title="StructuralPartialEq">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-FuzzyError" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-FuzzyError" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-FuzzyError" title="Send">Send</a></li><li><a href="#impl-Sync-for-FuzzyError" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-FuzzyError" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-FuzzyError" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-ToString-for-T" title="ToString">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In rust_<wbr>fuzzylogic::<wbr>error</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rust_fuzzylogic</a>::<wbr><a href="index.html">error</a></div><h1>Enum <span class="enum">FuzzyError</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rust_fuzzylogic/error.rs.html#11-17">Source</a> </span></div><pre class="rust item-decl"><code><div class="code-attribute">#[non_exhaustive]</div>pub enum FuzzyError {
    BadArity,
    EmptyInput,
    TypeMismatch,
    OutOfBounds,
    NotFound {
        space: <a class="enum" href="enum.MissingSpace.html" title="enum rust_fuzzylogic::error::MissingSpace">MissingSpace</a>,
        key: <a class="struct" href="https://doc.rust-lang.org/1.89.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
    },
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Basic errors that can occur in the rust-fuzzylogic library</p>
</div></details><h2 id="variants" class="variants section-header">Variants (Non-exhaustive)<a href="#variants" class="anchor">§</a></h2><details class="toggle non-exhaustive"><summary class="hideme"><span>This enum is marked as non-exhaustive</span></summary><div class="docblock">Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.</div></details><div class="variants"><section id="variant.BadArity" class="variant"><a href="#variant.BadArity" class="anchor">§</a><h3 class="code-header">BadArity</h3></section><section id="variant.EmptyInput" class="variant"><a href="#variant.EmptyInput" class="anchor">§</a><h3 class="code-header">EmptyInput</h3></section><section id="variant.TypeMismatch" class="variant"><a href="#variant.TypeMismatch" class="anchor">§</a><h3 class="code-header">TypeMismatch</h3></section><section id="variant.OutOfBounds" class="variant"><a href="#variant.OutOfBounds" class="anchor">§</a><h3 class="code-header">OutOfBounds</h3></section><section id="variant.NotFound" class="variant"><a href="#variant.NotFound" class="anchor">§</a><h3 class="code-header">NotFound</h3></section><div class="sub-variant" id="variant.NotFound.fields"><h4>Fields</h4><div class="sub-variant-field"><span id="variant.NotFound.field.space" class="section-header"><a href="#variant.NotFound.field.space" class="anchor field">§</a><code>space: <a class="enum" href="enum.MissingSpace.html" title="enum rust_fuzzylogic::error::MissingSpace">MissingSpace</a></code></span></div><div class="sub-variant-field"><span id="variant.NotFound.field.key" class="section-header"><a href="#variant.NotFound.field.key" class="anchor field">§</a><code>key: <a class="struct" href="https://doc.rust-lang.org/1.89.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span></div></div></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-FuzzyError" class="impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#impl-Clone-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h4></section></summary><div class='docblock'>Returns a duplicate of the value. <a href="https://doc.rust-lang.org/1.89.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.89.0/src/core/clone.rs.html#213-215">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.89.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-FuzzyError" class="impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#impl-Debug-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.89.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.89.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.89.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-FuzzyError" class="impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#25-52">Source</a><a href="#impl-Display-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#26-51">Source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.89.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.89.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.89.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Error-for-FuzzyError" class="impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#54">Source</a><a href="#impl-Error-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.source" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="src" href="https://doc.rust-lang.org/1.89.0/src/core/error.rs.html#105">Source</a></span><a href="#method.source" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html#method.source" class="fn">source</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.89.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;(dyn <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)&gt;</h4></section></summary><div class='docblock'>Returns the lower-level source of this error, if any. <a href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html#method.source">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.description" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.89.0/src/core/error.rs.html#131">Source</a></span><a href="#method.description" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html#method.description" class="fn">description</a>(&amp;self) -&gt; &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.42.0: use the Display impl or to_string()</span></div></span><div class='docblock'> <a href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html#method.description">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.cause" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.89.0/src/core/error.rs.html#141">Source</a></span><a href="#method.cause" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html#method.cause" class="fn">cause</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.89.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;dyn <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.33.0: replaced by Error::source, which can support downcasting</span></div></span></details><details class="toggle method-toggle" open><summary><section id="method.provide" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/error.rs.html#204">Source</a><a href="#method.provide" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html#method.provide" class="fn">provide</a>&lt;'a&gt;(&amp;'a self, request: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.89.0/core/error/struct.Request.html" title="struct core::error::Request">Request</a>&lt;'a&gt;)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>error_generic_member_access</code>)</span></div></span><div class='docblock'>Provides type-based access to context intended for error reports. <a href="https://doc.rust-lang.org/1.89.0/core/error/trait.Error.html#method.provide">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-FuzzyError" class="impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#impl-Hash-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a>&lt;__H: <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>&gt;(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html">&amp;mut __H</a>)</h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/1.89.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.89.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/1.89.0/src/core/hash/mod.rs.html#235-237">Source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a>&lt;H&gt;(data: &amp;[Self], state: <a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html">&amp;mut H</a>)<div class="where">where
    H: <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,
    Self: <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/1.89.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.89.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-FuzzyError" class="impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#impl-PartialEq-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&amp;self, other: &amp;<a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.89.0/src/core/cmp.rs.html#263">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</div></details></div></details><section id="impl-Eq-for-FuzzyError" class="impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#impl-Eq-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section><section id="impl-StructuralPartialEq-for-FuzzyError" class="impl"><a class="src rightside" href="../../src/rust_fuzzylogic/error.rs.html#8">Source</a><a href="#impl-StructuralPartialEq-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-FuzzyError" class="impl"><a href="#impl-Freeze-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section><section id="impl-RefUnwindSafe-for-FuzzyError" class="impl"><a href="#impl-RefUnwindSafe-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section><section id="impl-Send-for-FuzzyError" class="impl"><a href="#impl-Send-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section><section id="impl-Sync-for-FuzzyError" class="impl"><a href="#impl-Sync-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section><section id="impl-Unpin-for-FuzzyError" class="impl"><a href="#impl-Unpin-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section><section id="impl-UnwindSafe-for-FuzzyError" class="impl"><a href="#impl-UnwindSafe-for-FuzzyError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.FuzzyError.html" title="enum rust_fuzzylogic::error::FuzzyError">FuzzyError</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
    T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.89.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.89.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.89.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
    T: ?<a class="trait" href="https://doc.rust-lang.org/1.89.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.89.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
    T: ?<a class="trait" href="https://doc.rust-lang.org/1.89.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.89.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/clone.rs.html#483">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
    T: <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/clone.rs.html#485">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/1.89.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&amp;self, dest: <a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dest</code>. <a href="https://doc.rust-lang.org/1.89.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/convert/mod.rs.html#774">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/convert/mod.rs.html#777">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/convert/mod.rs.html#757-759">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
    U: <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.89.0/src/core/convert/mod.rs.html#767">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.89.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of



 ... (clipped 6 lines)
Misleading error context

Description: Possible logic issue in error context for NotFound uses key as term while space is Var,
which could leak confusing error information; although not a direct security exploit,
verify that missing variable vs term are reported correctly to avoid misrouting inputs.
mamdani.rs.html [52-71]

Referred Code
<a href=#52 id=52 data-nosnippet>52</a>        <span class="kw-2">&amp;</span><span class="self">self</span>,
<a href=#53 id=53 data-nosnippet>53</a>        alpha: Float,
<a href=#54 id=54 data-nosnippet>54</a>        vers: <span class="kw-2">&amp;</span>HashMap&lt;KV, Variable&gt;,
<a href=#55 id=55 data-nosnippet>55</a>        sampler: <span class="kw-2">&amp;</span>UniformSampler,
<a href=#56 id=56 data-nosnippet>56</a>    ) -&gt; <span class="prelude-ty">Result</span>&lt;HashMap&lt;String, Vec&lt;Float&gt;&gt;&gt;
<a href=#57 id=57 data-nosnippet>57</a>    <span class="kw">where
<a href=#58 id=58 data-nosnippet>58</a>        </span>KV: Eq + Hash + Borrow&lt;str&gt;,
<a href=#59 id=59 data-nosnippet>59</a>    {
<a href=#60 id=60 data-nosnippet>60</a>        <span class="kw">let </span><span class="kw-2">mut </span>result_map: HashMap&lt;String, Vec&lt;Float&gt;&gt; = HashMap::new();
<a href=#61 id=61 data-nosnippet>61</a>
<a href=#62 id=62 data-nosnippet>62</a>        <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..<span class="self">self</span>.consequent.len() {
<a href=#63 id=63 data-nosnippet>63</a>            <span class="kw">let </span><span class="kw-2">mut </span>result_vec = <span class="macro">vec!</span>[<span class="number">0.0</span>; sampler.n];
<a href=#64 id=64 data-nosnippet>64</a>
<a href=#65 id=65 data-nosnippet>65</a>            <span class="kw">let </span>(dom_min, dom_max) = vers
<a href=#66 id=66 data-nosnippet>66</a>                .get(<span class="kw-2">&amp;</span><span class="self">self</span>.consequent[i].var.as_str())
<a href=#67 id=67 data-nosnippet>67</a>                .ok_or(FuzzyError::NotFound {
<a href=#68 id=68 data-nosnippet>68</a>                    space: MissingSpace::Var,
<a href=#69 id=69 data-nosnippet>69</a>                    key: <span class="self">self</span>.consequent[i].term.clone(),
<a href=#70 id=70 data-nosnippet>70</a>                })<span class="question-mark">?
<a href=#71 id=71 data-nosnippet>71</a>                </span>.domain();
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
PR diff is missing source code

The PR is missing Rust source code, as the diff only contains generated
documentation files. The source code modifications should be included for
review.

Examples:

target/doc/rust_fuzzylogic/error/enum.FuzzyError.html [1-27]
target/doc/rust_fuzzylogic/antecedent/enum.Antecedent.html [1-35]

Solution Walkthrough:

Before:

// The PR diff only contains generated HTML documentation files.
// No source code (.rs files) is included for review.

File: 'target/doc/rust_fuzzylogic/error/enum.FuzzyError.html'
<!DOCTYPE html><html lang="en">...</html>

File: 'target/doc/rust_fuzzylogic/antecedent/enum.Antecedent.html'
<!DOCTYPE html><html lang="en">...</html>

// ... and other documentation files.

After:

// The PR diff should contain the actual Rust source code files.

File: 'src/error.rs'
pub enum FuzzyError {
    BadArity,
    EmptyInput,
    TypeMismatch,
    OutOfBounds,
    NotFound { ... },
}
...

File: 'src/antecedent.rs'
pub enum Antecedent {
    Atom { var: String, term: String },
    And(Box<Self>, Box<Self>),
    Or(Box<Self>, Box<Self>),
    Not(Box<Self>),
}
...
Suggestion importance[1-10]: 10

__

Why: This suggestion correctly identifies a critical flaw; the PR is unreviewable because it only contains generated documentation files instead of the actual source code.

High
  • More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant