molasses 0.1.0

A Rust implementation of the Message Layer Security group messaging protocol
Documentation
I think I've shot myself in the foot. I am writing a library that implements a protocol. The protocol has a notion of "Cipher Suites" where a particular set of algorithms can be used to do a particular task. These should be swappable. So I have a data structure, let's say it's a list of messages, parameterized over the cipher suite that's being used. The issue is that I need to be able to determine the cipher suite at runtime. So I need a thing that returns a trait object implementing the appropriate functions. The issue here is that the cipher suite trait also has associated types that I don't know in advance, and the compiler won't let me return dyn Traits with unspecified associated types. I have a concrete example here. Does anyone have advice for how to get around this? https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=15c27ff396f2436abf7b63dbcdf11829

Ok I found a way to deserialize these structs, but it's really ugly. Does anyone have a better suggestions? This is the solution: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3e6b696b38030dd4bc739079e880ec79 and this is the problem: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=15c27ff396f2436abf7b63dbcdf11829

Talchas solution: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a399bd4e5c9a6ad89b882fe5b8453201