Type Alias ContentRepresentations

Source
pub type ContentRepresentations = HashMap<MediaType, RegisteredContent>;
Expand description

Alternative representations of the same resource.

Aliased Type§

pub struct ContentRepresentations { /* private fields */ }

Trait Implementations§

Source§

impl Render for ContentRepresentations

Source§

type Output = Box<dyn ByteStream<Item = Result<Bytes, StreamError>>>

Source§

fn render<'accept, ServerInfo, Engine, Accept>( &self, context: RenderContext<'_, ServerInfo, Engine>, acceptable_media_ranges: Accept, ) -> Result<Media<Self::Output>, RenderError>
where ServerInfo: Clone + Serialize, Engine: ContentEngine<ServerInfo>, Accept: IntoIterator<Item = &'accept MediaRange>, Self::Output: ByteStream,