pub struct TargetInfo<'a> { /* private fields */ }Implementations§
Source§impl<'a> TargetInfo<'a>
impl<'a> TargetInfo<'a>
Sourcepub fn builder(
target_id: impl Into<TargetID<'a>>,
type_: impl Into<Cow<'a, str>>,
title: impl Into<Cow<'a, str>>,
url: impl Into<Cow<'a, str>>,
attached: bool,
can_access_opener: bool,
) -> TargetInfoBuilder<'a>
pub fn builder( target_id: impl Into<TargetID<'a>>, type_: impl Into<Cow<'a, str>>, title: impl Into<Cow<'a, str>>, url: impl Into<Cow<'a, str>>, attached: bool, can_access_opener: bool, ) -> TargetInfoBuilder<'a>
Creates a builder for this type with the required parameters:
target_id:type_: List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22title:url:attached: Whether the target has an attached client.can_access_opener: Whether the target has access to the originating window.
pub fn target_id(&self) -> &TargetID<'a>
pub fn title(&self) -> &str
pub fn url(&self) -> &str
Sourcepub fn parent_id(&self) -> Option<&TargetID<'a>>
pub fn parent_id(&self) -> Option<&TargetID<'a>>
Id of the parent target, if any. For example, “iframe” target may have a “page” parent.
Sourcepub fn can_access_opener(&self) -> bool
pub fn can_access_opener(&self) -> bool
Whether the target has access to the originating window.
Sourcepub fn opener_frame_id(&self) -> Option<&FrameId<'a>>
pub fn opener_frame_id(&self) -> Option<&FrameId<'a>>
Frame id of originating window (is only set if target has an opener).
Sourcepub fn parent_frame_id(&self) -> Option<&FrameId<'a>>
pub fn parent_frame_id(&self) -> Option<&FrameId<'a>>
Id of the parent frame, present for “iframe” and “worker” targets. For nested workers, this is the “ancestor” frame that created the first worker in the nested chain.
pub fn browser_context_id(&self) -> Option<&BrowserContextID<'a>>
Trait Implementations§
Source§impl<'a> Clone for TargetInfo<'a>
impl<'a> Clone for TargetInfo<'a>
Source§fn clone(&self) -> TargetInfo<'a>
fn clone(&self) -> TargetInfo<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for TargetInfo<'a>
impl<'a> Debug for TargetInfo<'a>
Source§impl<'a> Default for TargetInfo<'a>
impl<'a> Default for TargetInfo<'a>
Source§fn default() -> TargetInfo<'a>
fn default() -> TargetInfo<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for TargetInfo<'a>
impl<'de, 'a> Deserialize<'de> for TargetInfo<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for TargetInfo<'a>
impl<'a> RefUnwindSafe for TargetInfo<'a>
impl<'a> Send for TargetInfo<'a>
impl<'a> Sync for TargetInfo<'a>
impl<'a> Unpin for TargetInfo<'a>
impl<'a> UnsafeUnpin for TargetInfo<'a>
impl<'a> UnwindSafe for TargetInfo<'a>
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