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§
Sourcefn into_contents(self) -> Vec<Content>
fn into_contents(self) -> Vec<Content>
Convert to content items without error possibility
Provided Methods§
Sourcefn into_cached_content_for(self, model_name: &str) -> CachedContentwhere
Self: Sized,
fn into_cached_content_for(self, model_name: &str) -> CachedContentwhere
Self: Sized,
Create cached content targeting a specific model