pub trait MultiWriter {
type Writer: WriteMutations;
// Required method
fn writer_for(&mut self, id: RenderTargetId) -> Option<&mut Self::Writer>;
}Expand description
A host’s collection of render-target writers.
The diff routes each write to the writer for the render target it lands
in. Single-target hosts get this for free: every WriteMutations writer
is a MultiWriter serving RenderTargetId::ROOT and nothing else.
Hosts that fan out to several sinks (one webview per window, one collector
per portal target) implement Self::writer_for over their own writer
storage.
Required Associated Types§
Sourcetype Writer: WriteMutations
type Writer: WriteMutations
The writer type serving each individual target.
Required Methods§
Sourcefn writer_for(&mut self, id: RenderTargetId) -> Option<&mut Self::Writer>
fn writer_for(&mut self, id: RenderTargetId) -> Option<&mut Self::Writer>
The writer for id, or None for a target with no attached host.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".