Skip to main content

IntoMessages

Trait IntoMessages 

Source
pub trait IntoMessages {
    // Required method
    fn into_messages(self) -> Vec<Message>;
}
Expand description

Trait for values that can be turned into a list of chat messages, so the public API can accept &str, String, Message, or vectors thereof — mirroring the Python str | Message | list[...] unions.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoMessages for &str

Source§

impl IntoMessages for String

Source§

impl IntoMessages for Vec<&str>

Source§

impl IntoMessages for Vec<Message>

Source§

impl IntoMessages for Vec<String>

Implementors§