pub trait ResourceUrlHandler: Send + Sync + Debug {
    // Required method
    fn read_resource(&self, url: &Url) -> Result<MimeData>;
}
Expand description

Handle resource URLs.

Required Methods§

source

fn read_resource(&self, url: &Url) -> Result<MimeData>

Read a resource.

Read data from the given url, and return the data and its associated mime type if known, or any IO error which occurred while reading from the resource.

Alternatively, return an IO error with ErrorKind::Unsupported to indicate that the given url is not supported by this resource handler. In this case a higher level resource handler may try a different handler.

Implementations on Foreign Types§

source§

impl<'a, R: ResourceUrlHandler + ?Sized> ResourceUrlHandler for &'a R

Implementors§