pub trait TabsExt {
// Required methods
fn tab_list(
&self,
) -> impl Future<Output = Result<Vec<TabInfo>, BrowserError>> + Send;
fn tab_new(
&self,
url: Option<&str>,
) -> impl Future<Output = Result<(), BrowserError>> + Send;
fn tab_close(
&self,
index: Option<usize>,
) -> impl Future<Output = Result<(), BrowserError>> + Send;
fn tab_select(
&self,
index: usize,
) -> impl Future<Output = Result<(), BrowserError>> + Send;
fn dialog_accept(
&self,
text: Option<&str>,
) -> impl Future<Output = Result<(), BrowserError>> + Send;
fn dialog_dismiss(
&self,
) -> impl Future<Output = Result<(), BrowserError>> + Send;
}Expand description
Tab operations for browser client
Required Methods§
Sourcefn tab_list(
&self,
) -> impl Future<Output = Result<Vec<TabInfo>, BrowserError>> + Send
fn tab_list( &self, ) -> impl Future<Output = Result<Vec<TabInfo>, BrowserError>> + Send
List all browser tabs
Sourcefn tab_new(
&self,
url: Option<&str>,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn tab_new( &self, url: Option<&str>, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Open a new tab, optionally with URL
Sourcefn tab_close(
&self,
index: Option<usize>,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn tab_close( &self, index: Option<usize>, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Close a tab by index (or current if None)
Sourcefn tab_select(
&self,
index: usize,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn tab_select( &self, index: usize, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Select/switch to a tab by index
Sourcefn dialog_accept(
&self,
text: Option<&str>,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn dialog_accept( &self, text: Option<&str>, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Accept a dialog (alert, confirm, prompt) with optional text
Sourcefn dialog_dismiss(
&self,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn dialog_dismiss( &self, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Dismiss a dialog (alert, confirm, prompt)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.