pub struct Browser { /* private fields */ }Expand description
UI-thread target registry and flattened CDP session router, shared by the native server and browser bridge. Window and popup discovery follows the desktop application lifetime.
Implementations§
Source§impl Browser
impl Browser
pub fn new() -> Self
Sourcepub fn register(&mut self, root: &Ref<TopLevel>) -> String
pub fn register(&mut self, root: &Ref<TopLevel>) -> String
Explicit registration also supports custom lifetimes. The registry retains only a weak root.
pub fn refresh(&mut self)
pub fn discovery(&mut self, port: u16) -> Value
pub fn version(port: u16) -> Value
pub fn connect(&mut self, target: Option<&str>) -> Result<u64, String>
pub fn disconnect(&mut self, connection: u64)
pub fn handle(&mut self, connection: u64, message: &str) -> Vec<Value>
pub fn poll(&mut self, connection: u64) -> Vec<Value>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Browser
impl !Send for Browser
impl !Sync for Browser
impl !UnwindSafe for Browser
impl Freeze for Browser
impl Unpin for Browser
impl UnsafeUnpin for Browser
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more