Struct chromiumoxide::handler::target::Target

source ·
pub struct Target { /* private fields */ }

Implementations§

source§

impl Target

source

pub fn new( info: TargetInfo, config: TargetConfig, browser_context: BrowserContext ) -> Self

Create a new target instance with TargetInfo after a CreateTargetParams request.

source

pub fn set_session_id(&mut self, id: SessionId)

source

pub fn session_id(&self) -> Option<&SessionId>

source

pub fn browser_context(&self) -> &BrowserContext

source

pub fn session_id_mut(&mut self) -> &mut Option<SessionId>

source

pub fn target_id(&self) -> &TargetId

The identifier for this target

source

pub fn type(&self) -> &TargetType

The type of this target

source

pub fn is_initialized(&self) -> bool

Whether this target is already initialized

source

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

Navigate a frame

source

pub fn is_page(&self) -> bool

source

pub fn browser_context_id(&self) -> Option<&BrowserContextId>

source

pub fn info(&self) -> &TargetInfo

source

pub fn opener(&self) -> Option<&TargetId>

Get the target that opened this target. Top-level targets return None.

source

pub fn frame_manager(&self) -> &FrameManager

source

pub fn frame_manager_mut(&mut self) -> &mut FrameManager

source

pub fn event_listeners_mut(&mut self) -> &mut EventListeners

source

pub fn on_response(&mut self, resp: Response, method: &str)

Received a response to a command issued by this target

source

pub fn on_event(&mut self, event: CdpEventMessage)

source

pub fn set_initiator(&mut self, tx: Sender<Result<Page>>)

Set the sender half of the channel who requested the creation of this target

Trait Implementations§

source§

impl Debug for Target

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Target

§

impl !RefUnwindSafe for Target

§

impl Send for Target

§

impl !Sync for Target

§

impl Unpin for Target

§

impl !UnwindSafe for Target

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