pub trait ResourceUrlHandler: Send + Sync + Debug {
// Required method
fn read_resource(&self, url: &Url) -> Result<MimeData>;
}Expand description
Handle resource URLs.
Required Methods§
sourcefn read_resource(&self, url: &Url) -> Result<MimeData>
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.