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.
Auto Trait Implementations§
impl !RefUnwindSafe for DispatchingResourceHandler
impl Send for DispatchingResourceHandler
impl Sync for DispatchingResourceHandler
impl Unpin for DispatchingResourceHandler
impl !UnwindSafe for DispatchingResourceHandler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more