Skip to main content

Module connection

Module connection 

Source
Expand description

Runtime for the generated Playwright protocol bindings.

The Playwright driver speaks a JSON message protocol over a pipe. The client sends {id, guid, method, params, metadata} calls to an object (a “channel”) and the driver answers with {id, result} or {id, error}. The driver also pushes messages without an id: __create__ announces a new object together with its initializer, __adopt__ moves an object to a new parent, __dispose__ drops an object and its children, and anything else is an event on the object named by guid.

Connection owns that conversation. The generated types in crate::playwright::protocol are thin ChannelType wrappers around a Channel (the object’s guid plus the connection).

Structs§

Channel
One object on a Connection: its guid and the connection.
Connection
A protocol conversation with one Playwright driver.
EventStream
A stream of one object’s typed events.
ObjectRef
An untyped reference to any channel object (the spec’s Channel type).
RawEvent
A raw event as the driver sent it.
Ref
A typed reference to a channel object, serialized as {"guid": ...}.

Enums§

ProtocolError
Errors from the Playwright protocol runtime.

Traits§

ChannelType
A generated channel type (one per protocol interface).
ProtocolEvent
An event type generated for one interface.

Type Aliases§

Binary
Base64-encoded bytes, the protocol’s binary type.