pub trait ChromeController:
Send
+ Sync
+ 'static {
// Required methods
fn status(&self) -> ChromeStatus;
fn set_enabled(&self, enabled: bool);
fn set_mode(&self, mode: ChromePermissionMode);
fn dispatch<'life0, 'async_trait>(
&'life0 self,
command: ChromeCommand,
) -> Pin<Box<dyn Future<Output = Result<Value, ChromeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn is_enabled(&self) -> bool { ... }
}Expand description
Abstraction over the live browser bridge so model tools can be tested against
a fake. Implemented by ChromeBridge.
Required Methods§
Sourcefn status(&self) -> ChromeStatus
fn status(&self) -> ChromeStatus
Current connection status.
Sourcefn set_enabled(&self, enabled: bool)
fn set_enabled(&self, enabled: bool)
Enable/disable Chrome tools for the session.
Sourcefn set_mode(&self, mode: ChromePermissionMode)
fn set_mode(&self, mode: ChromePermissionMode)
Set the permission mode.
Sourcefn dispatch<'life0, 'async_trait>(
&'life0 self,
command: ChromeCommand,
) -> Pin<Box<dyn Future<Output = Result<Value, ChromeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dispatch<'life0, 'async_trait>(
&'life0 self,
command: ChromeCommand,
) -> Pin<Box<dyn Future<Output = Result<Value, ChromeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forward a command to the connected extension and await its result.
Provided Methods§
Sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Whether Chrome tools are enabled for the session.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".