pub trait ConvertMessage:
Sized
+ Send
+ Sync {
type Error: Error + Send;
// Required method
fn convert_from_message(message: Message) -> Result<Vec<Self>, Self::Error>;
}Expand description
A useful trait to help convert rig_core::completion::Message to your own message type.
Particularly useful if you don’t want to create a free-standing function as
when trying to use TryFrom<T>, you would normally run into the orphan rule as Vec is
technically considered a foreign type (it’s owned by stdlib).
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".