glendam/protocol/io
This module is generated from the Chrome DevTools Protocol schema.
Do not edit this file manually. Generator: dev/codegen/generate_bindings.gleam Regenerate with:
gleam run -m codegen/generate_bindings
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(protocol_support.BooleanSetting),
data: String,
eof: protocol_support.BooleanSetting,
)
}
Constructors
-
ReadResponse( base64_encoded: option.Option(protocol_support.BooleanSetting), data: String, eof: protocol_support.BooleanSetting, )Represents the ReadResponse protocol value.
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)Represents the ResolveBlobResponse protocol value.
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)Represents the StreamHandle protocol value.
Values
pub fn close(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
handle handle: StreamHandle,
) -> Result(dynamic.Dynamic, chrome.RequestError)
Close the stream, discard any temporary backing storage.
Parameters:
handle: Handle of the stream to close.
Returns:
pub fn read(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
handle handle: StreamHandle,
offset offset: option.Option(Int),
size size: option.Option(Int),
) -> Result(ReadResponse, chrome.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 callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
object_id object_id: runtime.RemoteObjectId,
) -> Result(ResolveBlobResponse, chrome.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.