Skip to content

Conversation

siennathesane
Copy link
Contributor

Added support & tests for multiple generics. This allows for complex type support like this:

#[derive(Serialize, Deserialize, ToRedisArgs, FromRedisValue]
pub struct Core<N, E>
where
    N: Node,
    E: EdgeBase,
{
    nodes: BTreeMap<Uuid, N>,
    outgoing_edges: BTreeMap<Uuid, Vec<Uuid>>,
    incoming_edges: BTreeMap<Uuid, Vec<Uuid>>,
    edges: BTreeMap<Uuid, E>,
}

closes #55

Signed-off-by: Sienna Meridian Satterwhite <sienna@r3t.io>
@siennathesane siennathesane force-pushed the feat/multiple-generics branch from 49b9b24 to 44fafd4 Compare July 14, 2025 13:28
@daniel7grant
Copy link
Owner

Hey Sienna, thank you for contributing and I apologise for not being able to look at it earlier. I didn't find any issue with your implementation, so I'll merge this right away. My only issue is I'd rather separate the multiple generic tests into their own file, but I'll just do this on the master branch if you don't mind.

Thanks for your work!

@daniel7grant daniel7grant merged commit 9e77ae8 into daniel7grant:master Jul 20, 2025
8 checks passed
@daniel7grant
Copy link
Owner

I published a new version v0.5.6, I hope it works perfectly for you.

@siennathesane
Copy link
Contributor Author

Sweet, thank you! And yeah, feel free to do whatever you want with the tests, I figured providing them was the important part :)

@siennathesane siennathesane deleted the feat/multiple-generics branch July 21, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macros fail when multiple generics are used

2 participants