Struct chromiumoxide::handler::frame::FrameManager

source ·
pub struct FrameManager { /* private fields */ }
Expand description

Maintains the state of the pages frame and listens to events produced by chromium targeting the Target. Also listens for events that indicate that a navigation was completed

Implementations§

source§

impl FrameManager

source

pub fn new(request_timeout: Duration) -> Self

source

pub fn init_commands(timeout: Duration) -> CommandChain

The commands to execute in order to initialize this frame manager

source

pub fn main_frame(&self) -> Option<&Frame>

source

pub fn main_frame_mut(&mut self) -> Option<&mut Frame>

source

pub fn frames(&self) -> impl Iterator<Item = &Frame> + '_

source

pub fn frame(&self, id: &FrameId) -> Option<&Frame>

source

pub fn on_http_request_finished(&mut self, request: HttpRequest)

Track the request in the frame

source

pub fn poll(&mut self, now: Instant) -> Option<FrameEvent>

source

pub fn goto(&mut self, req: FrameNavigationRequest)

Entrypoint for page navigation

source

pub fn navigate_frame(&mut self, frame_id: FrameId, req: FrameNavigationRequest)

Navigate a specific frame

source

pub fn on_attached_to_target(&mut self, _event: &EventAttachedToTarget)

Fired when a frame moved to another session

source

pub fn on_frame_tree(&mut self, frame_tree: FrameTree)

source

pub fn on_frame_attached( &mut self, frame_id: FrameId, parent_frame_id: Option<FrameId> )

source

pub fn on_frame_detached(&mut self, event: &EventFrameDetached)

source

pub fn on_frame_navigated(&mut self, frame: &CdpFrame)

source

pub fn on_frame_navigated_within_document( &mut self, event: &EventNavigatedWithinDocument )

source

pub fn on_frame_stopped_loading(&mut self, event: &EventFrameStoppedLoading)

source

pub fn on_frame_started_loading(&mut self, event: &EventFrameStartedLoading)

Fired when frame has started loading.

source

pub fn on_runtime_binding_called(&mut self, _ev: &EventBindingCalled)

Notification is issued every time when binding is called

source

pub fn on_frame_execution_context_created( &mut self, event: &EventExecutionContextCreated )

Issued when new execution context is created

source

pub fn on_frame_execution_context_destroyed( &mut self, event: &EventExecutionContextDestroyed )

Issued when execution context is destroyed

source

pub fn on_execution_contexts_cleared(&mut self)

Issued when all executionContexts were cleared

source

pub fn on_page_lifecycle_event(&mut self, event: &EventLifecycleEvent)

Fired for top level page lifecycle events (nav, load, paint, etc.)

source

pub fn ensure_isolated_world( &mut self, world_name: &str ) -> Option<CommandChain>

Trait Implementations§

source§

impl Debug for FrameManager

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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