IntoContent

Trait IntoContent 

Source
pub trait IntoContent: Sealed {
    // Required method
    fn into_content(self) -> Content;
}
Expand description

Infallible conversion to a single Content item

Automatically implemented for:

§Example

use google_ai_rs::{IntoContent, Part, Content};

let content = ("text", Part::blob("image/png", vec![0u8; 8])).into_content();
assert_eq!(content.parts.len(), 2);

See IntoParts for full doc

Required Methods§

Implementors§