#[non_exhaustive]pub struct BindOptions {
pub workspace_dir: Option<String>,
pub metadata: Option<Value>,
pub host: Option<String>,
pub port: Option<u16>,
}Expand description
Options for Browser::bind().
See: https://playwright.dev/docs/api/class-browser#browser-bind
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.workspace_dir: Option<String>Working directory for the server, used by CLI tooling and MCP clients.
metadata: Option<Value>Arbitrary JSON metadata the server attaches to the bound session.
host: Option<String>Host to listen on (e.g. "127.0.0.1"). When unset and port is also
unset, the server listens on a local pipe rather than a TCP port.
port: Option<u16>Port to listen on. Pass 0 to request an OS-assigned port.
Implementations§
Source§impl BindOptions
impl BindOptions
Sourcepub fn workspace_dir(self, workspace_dir: impl Into<String>) -> Self
pub fn workspace_dir(self, workspace_dir: impl Into<String>) -> Self
Workspace directory the bound browser should use.
Trait Implementations§
Source§impl Clone for BindOptions
impl Clone for BindOptions
Source§fn clone(&self) -> BindOptions
fn clone(&self) -> BindOptions
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 Debug for BindOptions
impl Debug for BindOptions
Source§impl Default for BindOptions
impl Default for BindOptions
Source§fn default() -> BindOptions
fn default() -> BindOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BindOptions
impl RefUnwindSafe for BindOptions
impl Send for BindOptions
impl Sync for BindOptions
impl Unpin for BindOptions
impl UnsafeUnpin for BindOptions
impl UnwindSafe for BindOptions
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