Trait IntoContents

Source
pub trait IntoContents: Sealed {
    // Required method
    fn into_contents(self) -> Vec<Content>;

    // Provided method
    fn into_cached_content_for(self, model_name: &str) -> CachedContent
       where Self: Sized { ... }
}
Expand description

Infallible conversion to multiple Content items

Automatically implemented for:

  • Any type implementing IntoContent (converted to single-item vector)
  • Vec<Content> (direct passthrough)

§Implementations

  • IntoContent
  • Vec<Content>

See IntoParts for full doc

Required Methods§

Source

fn into_contents(self) -> Vec<Content>

Convert to content items without error possibility

Provided Methods§

Source

fn into_cached_content_for(self, model_name: &str) -> CachedContent
where Self: Sized,

Create cached content targeting a specific model

Implementations on Foreign Types§

Source§

impl IntoContents for Vec<Content>

Implementors§