pub struct DispatchingResourceHandler { /* private fields */ }Expand description
A resource handler which dispatches reading among a list of inner handlers.
Implementations§
source§impl DispatchingResourceHandler
impl DispatchingResourceHandler
sourcepub fn new(handlers: Vec<Box<dyn ResourceUrlHandler>>) -> Self
pub fn new(handlers: Vec<Box<dyn ResourceUrlHandler>>) -> Self
Create a new handler wrapping all given handlers.
Trait Implementations§
source§impl Debug for DispatchingResourceHandler
impl Debug for DispatchingResourceHandler
source§impl ResourceUrlHandler for DispatchingResourceHandler
impl ResourceUrlHandler for DispatchingResourceHandler
source§fn read_resource(&self, url: &Url) -> Result<MimeData>
fn read_resource(&self, url: &Url) -> Result<MimeData>
Read from the given resource url.
Try every inner handler one after another, while handlers return an
ErrorKind::Unsupported IO error. For any other error abort and return the error.
Return the first different result, i.e. either data read or another error.