Adds more help on the workflow

This commit is contained in:
Dandaedre 2025-02-17 07:15:07 +01:00
parent 9d8beaf9b3
commit f5534a77a2
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
8 changed files with 404 additions and 1 deletions

1
.gitignore vendored
View File

@ -27,3 +27,4 @@ Cargo.lock
callgrind*
cache.out
tarpaulin-report.html
*.bkp

View File

@ -16,6 +16,7 @@ serde_rusqlite = "0.37.0"
serde_json = { version = "1.0.138", features = ["alloc"] }
struct-field-names-as-array = "0.3.0"
strum = { version = "0.27.0", features = ["derive"] }
thiserror = "2.0.11"
[dev-dependencies]
criterion = { version = "0.5" }

View File

@ -0,0 +1,322 @@
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.9 Chrome/128.0.6613.186 Electron/32.2.5 Safari/537.36" version="26.0.9">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
<mxGraphModel dx="410" dy="1179" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="dEHQTlttWntmzIJzVtkA-0" value="Database" style="swimlane;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="310" y="30" width="200" height="90" as="geometry">
<mxRectangle x="10" y="10" width="140" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-1" value="Data Tables" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-0" vertex="1">
<mxGeometry x="10" y="30" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-2" value="Recipe Tables" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-0" vertex="1">
<mxGeometry x="10" y="60" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-3" target="dEHQTlttWntmzIJzVtkA-8" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-26" value="FromVectored" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#FFB366;fontStyle=1" parent="dEHQTlttWntmzIJzVtkA-25" vertex="1" connectable="0">
<mxGeometry x="0.1668" y="-1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-3" value="Initial Object Representation" style="swimlane;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="320" y="250" width="200" height="60" as="geometry">
<mxRectangle x="10" y="160" width="190" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-10" value="Data" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-3" vertex="1">
<mxGeometry x="10" y="30" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-5" value="Interface.rs" style="swimlane;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="20" width="200" height="710" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.004;entryY=0.95;entryDx=0;entryDy=0;strokeColor=#FF6666;flowAnimation=1;entryPerimeter=0;" edge="1" parent="dEHQTlttWntmzIJzVtkA-5" source="dEHQTlttWntmzIJzVtkA-6" target="dEHQTlttWntmzIJzVtkA-18">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-20" y="80" />
<mxPoint x="-20" y="59" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-6" value="FixedRecipe" style="rounded=0;whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-5" vertex="1">
<mxGeometry x="10" y="70" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#3333FF;flowAnimation=1;" edge="1" parent="dEHQTlttWntmzIJzVtkA-5" source="dEHQTlttWntmzIJzVtkA-17" target="dEHQTlttWntmzIJzVtkA-79">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-30" y="560" />
<mxPoint x="-30" y="490" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-17" value="Refined List" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-5" vertex="1">
<mxGeometry x="10" y="550" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-18" value="RecipeElement" style="rounded=0;whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-5" vertex="1">
<mxGeometry x="10" y="40" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.004;entryY=0.95;entryDx=0;entryDy=0;strokeColor=#FF6666;flowAnimation=1;entryPerimeter=0;" edge="1" parent="dEHQTlttWntmzIJzVtkA-5" source="dEHQTlttWntmzIJzVtkA-31" target="dEHQTlttWntmzIJzVtkA-56">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-30" y="270" />
<mxPoint x="-30" y="249" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-31" value="Combinable" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-5" vertex="1">
<mxGeometry x="10" y="260" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0;strokeColor=#3333FF;flowAnimation=1;" edge="1" parent="dEHQTlttWntmzIJzVtkA-5" source="dEHQTlttWntmzIJzVtkA-41" target="dEHQTlttWntmzIJzVtkA-31">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-30" y="340" />
<mxPoint x="-30" y="280" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-41" value="RecipeCollection" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-5" vertex="1">
<mxGeometry x="10" y="330" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-53" value="ToTex &amp;amp; ToCsv &amp;amp; Reportable" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-5" vertex="1">
<mxGeometry x="10" y="580" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#FF6666;flowAnimation=1;" edge="1" parent="dEHQTlttWntmzIJzVtkA-5" source="dEHQTlttWntmzIJzVtkA-56" target="dEHQTlttWntmzIJzVtkA-18">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-30" y="230" />
<mxPoint x="-30" y="50" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-56" value="DbSerialisable" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-5" vertex="1">
<mxGeometry x="10" y="230" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-79" value="ToTex &amp;amp; ToCsv &amp;amp; Reportable" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-5" vertex="1">
<mxGeometry x="10" y="480" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#FF6666;flowAnimation=1;" edge="1" parent="dEHQTlttWntmzIJzVtkA-5" source="dEHQTlttWntmzIJzVtkA-83">
<mxGeometry relative="1" as="geometry">
<mxPoint x="10" y="570" as="targetPoint" />
<Array as="points">
<mxPoint x="-30" y="650" />
<mxPoint x="-30" y="570" />
<mxPoint x="9" y="570" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-83" value="ViewTable" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-5" vertex="1">
<mxGeometry x="10" y="640" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-7" value="Final Object Representation" style="swimlane;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="320" y="470" width="200" height="60" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-69" value="FinalData" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-7" vertex="1">
<mxGeometry x="10" y="30" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-67" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;jumpStyle=arc;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-8" target="dEHQTlttWntmzIJzVtkA-29" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="580" y="395" />
<mxPoint x="580" y="570" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-68" value="Into" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#FF1616;fontStyle=1;rotation=90;" parent="dEHQTlttWntmzIJzVtkA-67" vertex="1" connectable="0">
<mxGeometry x="0.288" relative="1" as="geometry">
<mxPoint y="-56" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-8" value="List of Recipies" style="swimlane;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="320" y="350" width="200" height="90" as="geometry">
<mxRectangle x="300" y="150" width="120" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-15" value="Vec&amp;lt;Data&amp;gt;" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-8" vertex="1">
<mxGeometry x="10" y="30" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-45" value="FilterFunction" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-8" vertex="1">
<mxGeometry x="10" y="60" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-18" target="dEHQTlttWntmzIJzVtkA-1" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-21" value="Impl" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="dEHQTlttWntmzIJzVtkA-20" vertex="1" connectable="0">
<mxGeometry x="-0.2207" y="-1" relative="1" as="geometry">
<mxPoint x="5" y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-6" target="dEHQTlttWntmzIJzVtkA-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-23" value="Impl" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="dEHQTlttWntmzIJzVtkA-22" vertex="1" connectable="0">
<mxGeometry x="-0.0828" y="-2" relative="1" as="geometry">
<mxPoint y="-2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-27" value="ViewTable" style="swimlane;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="320" y="660" width="200" height="60" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-28" value="Points of interest" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-27" vertex="1">
<mxGeometry x="10" y="30" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-29" value="List of FinalRecipies" style="swimlane;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="320" y="570" width="200" height="60" as="geometry">
<mxRectangle x="300" y="150" width="120" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-30" value="Vec&amp;lt;FinalData&amp;gt;" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-29" vertex="1">
<mxGeometry x="10" y="30" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.014;entryY=0.167;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-17" target="dEHQTlttWntmzIJzVtkA-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-49" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.014;entryY=0.102;entryDx=0;entryDy=0;entryPerimeter=0;jumpStyle=arc;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-41" target="dEHQTlttWntmzIJzVtkA-8" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-51" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-41" target="dEHQTlttWntmzIJzVtkA-45" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="260" y="360" />
<mxPoint x="260" y="420" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-52" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jumpStyle=arc;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-31" target="dEHQTlttWntmzIJzVtkA-15" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="270" y="290" />
<mxPoint x="270" y="390" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-54" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;flowAnimation=0;entryX=-0.015;entryY=0.26;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-53" target="dEHQTlttWntmzIJzVtkA-29" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="280" y="520" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-31" target="dEHQTlttWntmzIJzVtkA-3" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="270" y="290" />
<mxPoint x="270" y="265" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-58" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.009;entryY=0.164;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-56" target="dEHQTlttWntmzIJzVtkA-3" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-65" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-61" target="dEHQTlttWntmzIJzVtkA-3" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-66" value="Into" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#FF1616;fontStyle=1" parent="dEHQTlttWntmzIJzVtkA-65" vertex="1" connectable="0">
<mxGeometry x="0.3009" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-61" value="Intermediate Object Representation" style="swimlane;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="300" y="150" width="230" height="60" as="geometry">
<mxRectangle x="10" y="160" width="190" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-62" value="Data" style="whiteSpace=wrap;html=1;" parent="dEHQTlttWntmzIJzVtkA-61" vertex="1">
<mxGeometry x="10" y="30" width="210" height="20" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-63" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-1" target="dEHQTlttWntmzIJzVtkA-61" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="520" y="70" />
<mxPoint x="520" y="130" />
<mxPoint x="410" y="130" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-80" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-79" target="dEHQTlttWntmzIJzVtkA-69" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-81" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;jumpStyle=arc;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-30" target="dEHQTlttWntmzIJzVtkA-69" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="560" y="610" />
<mxPoint x="560" y="510" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-82" value="Converted" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#FF1616;fontStyle=1;rotation=90;" parent="dEHQTlttWntmzIJzVtkA-81" vertex="1" connectable="0">
<mxGeometry x="-0.0474" y="3" relative="1" as="geometry">
<mxPoint x="3" y="-25" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-84" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.007;entryY=0.164;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-83" target="dEHQTlttWntmzIJzVtkA-27" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-85" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.333;entryDx=0;entryDy=0;entryPerimeter=0;exitX=1;exitY=0.094;exitDx=0;exitDy=0;jumpStyle=arc;exitPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="dEHQTlttWntmzIJzVtkA-27" target="dEHQTlttWntmzIJzVtkA-29" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="580" y="666" />
<mxPoint x="580" y="590" />
</Array>
<mxPoint x="540" y="660" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="dEHQTlttWntmzIJzVtkA-86" value="Collect" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#FF1616;fontStyle=1;rotation=90;" parent="dEHQTlttWntmzIJzVtkA-85" vertex="1" connectable="0">
<mxGeometry x="0.0342" y="-1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-16" value="Scenario" style="swimlane;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="630" y="20" width="190" height="710" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="54zimUUJfCheyulekPPo-16" source="54zimUUJfCheyulekPPo-17" target="54zimUUJfCheyulekPPo-23">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-17" value="Database" style="whiteSpace=wrap;html=1;" vertex="1" parent="54zimUUJfCheyulekPPo-16">
<mxGeometry x="5" y="30" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-19" value="Final List" style="whiteSpace=wrap;html=1;" vertex="1" parent="54zimUUJfCheyulekPPo-16">
<mxGeometry x="5" y="550" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="54zimUUJfCheyulekPPo-16" source="54zimUUJfCheyulekPPo-23" target="54zimUUJfCheyulekPPo-25">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-23" value="Inner Intermediate Repr" style="whiteSpace=wrap;html=1;dashed=1;dashPattern=8 8;" vertex="1" parent="54zimUUJfCheyulekPPo-16">
<mxGeometry x="5" y="130" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="54zimUUJfCheyulekPPo-16" source="54zimUUJfCheyulekPPo-25" target="54zimUUJfCheyulekPPo-19">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-25" value="List of Recipies" style="whiteSpace=wrap;html=1;" vertex="1" parent="54zimUUJfCheyulekPPo-16">
<mxGeometry x="5" y="330" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-33" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;startArrow=classic;startFill=1;" edge="1" parent="54zimUUJfCheyulekPPo-16" source="54zimUUJfCheyulekPPo-31" target="54zimUUJfCheyulekPPo-19">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-31" value="Loaded View Tables" style="whiteSpace=wrap;html=1;" vertex="1" parent="54zimUUJfCheyulekPPo-16">
<mxGeometry x="5" y="640" width="180" height="20" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1.003;entryY=0.153;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="54zimUUJfCheyulekPPo-17" target="dEHQTlttWntmzIJzVtkA-0">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-24" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1.007;entryY=0.156;entryDx=0;entryDy=0;entryPerimeter=0;dashed=1;endArrow=none;startFill=1;startArrow=classic;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="54zimUUJfCheyulekPPo-23" target="dEHQTlttWntmzIJzVtkA-61">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1.003;entryY=0.104;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;startFill=1;startArrow=classic;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="54zimUUJfCheyulekPPo-25" target="dEHQTlttWntmzIJzVtkA-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1.008;entryY=0.183;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=0;endArrow=none;jumpStyle=arc;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="54zimUUJfCheyulekPPo-19" target="dEHQTlttWntmzIJzVtkA-29">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="522" y="580" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="54zimUUJfCheyulekPPo-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.998;entryY=0.167;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="54zimUUJfCheyulekPPo-31" target="dEHQTlttWntmzIJzVtkA-27">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

View File

@ -1,3 +1,8 @@
# TO-Impl List
- Initial Object Representation
- Final Object Representation
# Workflow
A B C
Database -> <Structs> -> <Weapons> -> Balancing data

31
weaponry/src/error.rs Normal file
View File

@ -0,0 +1,31 @@
// Workspace: weaponry
// File: weaponry/src/error.rs
//! Inner weaponry error definition
#![allow(missing_docs, clippy::missing_docs_in_private_items)]
use thiserror::Error;
#[derive(Error, Debug)]
/// Unrecoverable Error, all these error cannot gracefully fail and must return to the User for further handling
pub enum FatalEquipementError {
#[error("Unkown error has errored")]
Unknown,
}
#[derive(Error, Debug)]
/// Recoverable error, all these error exist to signal a retry or another path that should be taken by the program
pub enum TrivialEquipementError {
#[error("Very simple error")]
Oops,
}
#[derive(Error, Debug)]
/// An equipement error, either unrecoverable, indicating a that the execution
/// flow must be stopped and only an user input can solve the issue
pub enum EquipementError {
#[error("An unrecoverable error occured: {0}")]
Unrecoverable(#[from] FatalEquipementError),
#[error("A recoverable error occured but wasn't caught by the programming: {0}")]
Recoverable(#[from] TrivialEquipementError),
}

View File

@ -7,6 +7,8 @@
use std::{path::Path, rc::Rc};
use crate::error::EquipementError;
/// Trait representing a view table
///
/// These table exist to allow to link several point of interest to a RecipeCollection
@ -171,3 +173,42 @@ pub trait Reportable {
/// This report should give detailled information about the inner data, without showing the actual inner data
fn get_report(&self) -> String;
}
/// A recipe full stack scenario, from loading database through view table generation
///
/// The inner working while somehow abstracted are very tied together and tied to the impl
pub trait Scenario {
/// The inner database type
type DatabaseType; //: Database;
/// The type of viewtable that must be returned by the scenario
// Could also use dyn dispatch but since all of it is so tied down...
type ViewTableType: ViewTable;
/// The type of the final recipe list
type FinalListType: RefinedList;
/// Load all database into intermediate representation
fn load_from_database() -> Result<Self, EquipementError>
where
Self: std::marker::Sized;
// All these steps should be implemented but not required
// enforcing them helps writing new impls more easily but is not really nice in any way
//
// /// Process the inner representations and get a list of results
// fn process_inner_representation(&self) -> Result<(), FatalEquipementError>; //Result<(), EquipementError>
// /// Process inner recipes into a Final list
// ///
// /// This will generate the recipe list using the prefered method of the Scenario (Fixed Recipes or Cross Recipes or Whatever)
// fn process_recipes(&self);
// /// Process the recipes into a Refined Recipes
// fn refine_recipes(&self);
/// Generate the final list type
fn generate_refined_recipes(&self) -> Self::FinalListType;
/// Gather the selected view tables
/// All the inner generation is done gradually and populate all section to finally generate the views
fn generate_view_tables(&self) -> Self::ViewTableType;
}

View File

@ -6,6 +6,7 @@
#![feature(iter_intersperse, generic_arg_infer)]
mod database;
pub mod error;
mod export;
pub mod interfaces;
mod strategy;

View File

@ -53,7 +53,8 @@ mod test {
interfaces::RecipeCollection,
weaponry_structs::{
DamageMod, DamageType, Equipement, InitialEquipementList, SpecialCategory,
WeaponCategory, equipement_fields::PhysicalDamageType, equipement_structs::InnerEquipementStats,
WeaponCategory, equipement_fields::PhysicalDamageType,
equipement_structs::InnerEquipementStats,
},
};
use pretty_assertions::assert_eq;