mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Rustfmt net_traits crate
This commit is contained in:
parent
f512e262a5
commit
d41be1d56d
10 changed files with 229 additions and 131 deletions
|
@ -101,16 +101,19 @@ pub enum UsePlaceholder {
|
|||
// ======================================================================
|
||||
|
||||
pub trait ImageCache: Sync + Send {
|
||||
fn new(webrender_api: webrender_api::RenderApi) -> Self where Self: Sized;
|
||||
fn new(webrender_api: webrender_api::RenderApi) -> Self
|
||||
where
|
||||
Self: Sized;
|
||||
|
||||
/// Return any available metadata or image for the given URL,
|
||||
/// or an indication that the image is not yet available if it is in progress,
|
||||
/// or else reserve a slot in the cache for the URL if the consumer can request images.
|
||||
fn find_image_or_metadata(&self,
|
||||
url: ServoUrl,
|
||||
use_placeholder: UsePlaceholder,
|
||||
can_request: CanRequestImages)
|
||||
-> Result<ImageOrMetadataAvailable, ImageState>;
|
||||
fn find_image_or_metadata(
|
||||
&self,
|
||||
url: ServoUrl,
|
||||
use_placeholder: UsePlaceholder,
|
||||
can_request: CanRequestImages,
|
||||
) -> Result<ImageOrMetadataAvailable, ImageState>;
|
||||
|
||||
/// Add a new listener for the given pending image id. If the image is already present,
|
||||
/// the responder will still receive the expected response.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue