struct PendingLoad {
    bytes: ImageBytes,
    metadata: Option<ImageMetadata>,
    result: Option<Result<(), NetworkError>>,
    listeners: Vec<ImageLoadListener>,
    url: ServoUrl,
    load_origin: ImmutableOrigin,
    cors_setting: Option<CorsSettings>,
    cors_status: CorsStatus,
    final_url: Option<ServoUrl>,
    content_type: Option<Mime>,
}Expand description
Represents an image that is either being loaded by the resource thread, or decoded by a worker thread.
Fields§
§bytes: ImageBytesThe bytes loaded so far. Reset to an empty vector once loading is complete and the buffer has been transmitted to the decoder.
metadata: Option<ImageMetadata>Image metadata, if available.
result: Option<Result<(), NetworkError>>Once loading is complete, the result of the operation.
listeners: Vec<ImageLoadListener>The listeners that are waiting for this response to complete.
url: ServoUrlThe url being loaded. Do not forget that this may be several Mb if we are loading a data: url.
load_origin: ImmutableOriginThe origin that requested this load.
cors_setting: Option<CorsSettings>The CORS attribute setting for the requesting
cors_status: CorsStatusThe CORS status of this image response.
final_url: Option<ServoUrl>The URL of the final response that contains a body.
content_type: Option<Mime>The MIME type from the Content-type header of the HTTP response, if any.
Implementations§
Source§impl PendingLoad
 
impl PendingLoad
fn new( url: ServoUrl, load_origin: ImmutableOrigin, cors_setting: Option<CorsSettings>, ) -> PendingLoad
fn add_listener(&mut self, listener: ImageLoadListener)
Trait Implementations§
Source§impl MallocSizeOf for PendingLoad
 
impl MallocSizeOf for PendingLoad
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
 
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl Freeze for PendingLoad
impl RefUnwindSafe for PendingLoad
impl Send for PendingLoad
impl Sync for PendingLoad
impl Unpin for PendingLoad
impl UnwindSafe for PendingLoad
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
Source§impl<T> Instrument for T
 
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
 
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
 
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
 
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
 
fn maybe_boxed(self) -> T
Convert