chrobot/protocol/io
⚙️ This module was generated from the Chrome DevTools Protocol version 1.3
IO Domain
Input/Output operations for streams produced by DevTools.
📖 View this domain on the DevTools Protocol API Docs
Types
This type is not part of the protocol spec, it has been generated dynamically
to represent the response to the command read
pub type ReadResponse {
ReadResponse(
base64_encoded: option.Option(Bool),
data: String,
eof: Bool,
)
}
Constructors
-
ReadResponse( base64_encoded: option.Option(Bool), data: String, eof: Bool, )
Arguments
-
base64_encoded
Set if the data is base64-encoded
-
data
Data that were read.
-
eof
Set if the end-of-file condition occurred while reading.
-
This type is not part of the protocol spec, it has been generated dynamically
to represent the response to the command resolve_blob
pub type ResolveBlobResponse {
ResolveBlobResponse(uuid: String)
}
Constructors
-
ResolveBlobResponse(uuid: String)
Arguments
-
uuid
UUID of the specified Blob.
-
This is either obtained from another method or specified as blob:<uuid>
where
<uuid>
is an UUID of a Blob.
pub type StreamHandle {
StreamHandle(String)
}
Constructors
-
StreamHandle(String)
Functions
pub fn close(
callback__: fn(String, Option(Json)) -> a,
handle handle: StreamHandle,
) -> a
Close the stream, discard any temporary backing storage.
Parameters:
handle
: Handle of the stream to close.
Returns:
pub fn read(
callback__: fn(String, Option(Json)) ->
Result(Dynamic, RequestError),
handle handle: StreamHandle,
offset offset: Option(Int),
size size: Option(Int),
) -> Result(ReadResponse, RequestError)
Read a chunk of the stream
Parameters:
handle
: Handle of the stream to read.offset
: Seek to the specified offset before reading (if not specified, proceed with offset following the last read). Some types of streams may only support sequential reads.size
: Maximum number of bytes to read (left upon the agent discretion if not specified).
Returns:
base64_encoded
: Set if the data is base64-encodeddata
: Data that were read.eof
: Set if the end-of-file condition occurred while reading.
pub fn resolve_blob(
callback__: fn(String, Option(Json)) ->
Result(Dynamic, RequestError),
object_id object_id: RemoteObjectId,
) -> Result(ResolveBlobResponse, RequestError)
Return UUID of Blob object specified by a remote object id.
Parameters:
object_id
: Object id of a Blob object wrapper.
Returns:
uuid
: UUID of the specified Blob.