Struct net_traits::FetchThread
source · pub(crate) struct FetchThread {
pub(crate) active_fetches: HashMap<RequestId, BoxedFetchCallback>,
pub(crate) core_resource_thread: CoreResourceThread,
pub(crate) receiver: Receiver<ToFetchThreadMessage>,
pub(crate) to_fetch_sender: IpcSender<FetchResponseMsg>,
}
Expand description
A thread to handle fetches in a Servo process. This thread is responsible for listening for new fetch requests as well as updates on those operations and forwarding them to crossbeam channels.
Fields§
§active_fetches: HashMap<RequestId, BoxedFetchCallback>
A list of active fetches. A fetch is no longer active once the
FetchResponseMsg::ProcessResponseEOF
is received.
core_resource_thread: CoreResourceThread
A reference to the CoreResourceThread
used to kick off fetch requests.
receiver: Receiver<ToFetchThreadMessage>
A crossbeam receiver attached to the router proxy which converts incoming fetch updates from IPC messages to crossbeam messages as well as another sender which handles requests from clients wanting to do fetches.
to_fetch_sender: IpcSender<FetchResponseMsg>
An IpcSender
that’s sent with every fetch request and leads back to our
router proxy.
Implementations§
source§impl FetchThread
impl FetchThread
pub(crate) fn spawn( core_resource_thread: &CoreResourceThread, ) -> Sender<ToFetchThreadMessage>
pub(crate) fn run(&mut self)
Auto Trait Implementations§
impl Freeze for FetchThread
impl !RefUnwindSafe for FetchThread
impl Send for FetchThread
impl !Sync for FetchThread
impl Unpin for FetchThread
impl !UnwindSafe for FetchThread
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