DevtoolsInstance

Struct DevtoolsInstance 

Source
pub(crate) struct DevtoolsInstance {
    pub(crate) registry: Arc<ActorRegistry>,
    pub(crate) id_map: Arc<Mutex<IdMap>>,
    pub(crate) browsing_contexts: FxHashMap<BrowsingContextId, String>,
    pub(crate) sender: Sender<DevtoolsControlMsg>,
    pub(crate) receiver: Receiver<DevtoolsControlMsg>,
    pub(crate) pipelines: FxHashMap<PipelineId, BrowsingContextId>,
    pub(crate) actor_workers: FxHashMap<WorkerId, String>,
    pub(crate) actor_requests: HashMap<String, String>,
    pub(crate) connections: Arc<Mutex<FxHashMap<StreamId, DevtoolsConnection>>>,
    pub(crate) next_resource_id: u64,
}

Fields§

§registry: Arc<ActorRegistry>§id_map: Arc<Mutex<IdMap>>§browsing_contexts: FxHashMap<BrowsingContextId, String>§sender: Sender<DevtoolsControlMsg>

This is handed to clients so they can notify the devtools instance when their connection closes.

§receiver: Receiver<DevtoolsControlMsg>§pipelines: FxHashMap<PipelineId, BrowsingContextId>§actor_workers: FxHashMap<WorkerId, String>§actor_requests: HashMap<String, String>§connections: Arc<Mutex<FxHashMap<StreamId, DevtoolsConnection>>>

A map of active TCP connections to devtools clients.

Client threads remove their connection from here once they exit.

§next_resource_id: u64

Implementations§

Source§

impl DevtoolsInstance

Source

pub(crate) fn create( sender: Sender<DevtoolsControlMsg>, receiver: Receiver<DevtoolsControlMsg>, embedder: EmbedderProxy, ) -> Option<Self>

Source

pub(crate) fn run(self)

Source

pub(crate) fn handle_framerate_tick(&self, actor_name: String, tick: f64)

Source

pub(crate) fn handle_navigate( &self, browsing_context_id: BrowsingContextId, state: NavigationState, )

Source

pub(crate) fn handle_new_global( &mut self, ids: (BrowsingContextId, PipelineId, Option<WorkerId>, WebViewId), script_sender: GenericSender<DevtoolScriptControlMsg>, page_info: DevtoolsPageInfo, )

Source

pub(crate) fn handle_title_changed( &self, pipeline_id: PipelineId, title: String, )

Source

pub(crate) fn handle_console_resource( &mut self, pipeline_id: PipelineId, worker_id: Option<WorkerId>, resource: ConsoleResource, )

Source

pub(crate) fn handle_dom_mutation( &mut self, pipeline_id: PipelineId, dom_mutation: DomMutation, ) -> Result<(), ActorError>

Source

pub(crate) fn handle_clear_console( &mut self, pipeline_id: PipelineId, worker_id: Option<WorkerId>, )

Source

pub(crate) fn find_console_actor( &self, pipeline_id: PipelineId, worker_id: Option<WorkerId>, ) -> Option<String>

Source

pub(crate) fn handle_network_event( &mut self, connections: Vec<DevtoolsConnection>, request_id: String, network_event: NetworkEvent, )

Source

pub(crate) fn create_network_event_actor( &mut self, request_id: String, watcher_name: String, ) -> String

Create a new NetworkEventActor for a given request ID and watcher name.

Source

pub(crate) fn handle_create_source_actor( &mut self, script_sender: GenericSender<DevtoolScriptControlMsg>, pipeline_id: PipelineId, source_info: SourceInfo, )

Source

pub(crate) fn handle_update_source_content( &mut self, pipeline_id: PipelineId, source_content: String, )

Source

pub(crate) fn handle_debugger_pause( &mut self, pipeline_id: PipelineId, frame_offset: FrameOffset, pause_reason: PauseReason, )

Source

pub(crate) fn handle_create_frame_actor( &mut self, result_sender: GenericSender<String>, pipeline_id: PipelineId, frame: FrameInfo, )

Source

pub(crate) fn handle_create_environment_actor( &mut self, result_sender: GenericSender<String>, environment_info: EnvironmentInfo, parent: Option<String>, )

Trait Implementations§

Source§

impl MallocSizeOf for DevtoolsInstance

Source§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> MaybeBoxed<Box<T>> for T

Source§

fn maybe_boxed(self) -> Box<T>

Convert
Source§

impl<T> MaybeBoxed<T> for T

Source§

fn maybe_boxed(self) -> T

Convert
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T