butterbidi/definition
Types
pub type Command {
Command(
id: Int,
command_data: CommandData,
extensible: List(#(String, json.Json)),
)
}
Constructors
-
Command( id: Int, command_data: CommandData, extensible: List(#(String, json.Json)), )
pub type CommandData {
SessionCommand(session_command: definition.SessionCommand)
BrowserCommand(browser_command: definition.BrowserCommand)
BrowsingContextCommand(
browsing_context_command: definition.BrowsingContextCommand,
)
ScriptCommand(script_command: definition.ScriptCommand)
InputCommand(input_command: definition.InputCommand)
}
Constructors
-
SessionCommand(session_command: definition.SessionCommand) -
BrowserCommand(browser_command: definition.BrowserCommand) -
BrowsingContextCommand( browsing_context_command: definition.BrowsingContextCommand, ) -
ScriptCommand(script_command: definition.ScriptCommand) -
InputCommand(input_command: definition.InputCommand)
pub type CommandResponse {
CommandResponse(
command_type: String,
id: Int,
result: ResultData,
extensible: List(#(String, json.Json)),
)
}
Constructors
-
CommandResponse( command_type: String, id: Int, result: ResultData, extensible: List(#(String, json.Json)), )
pub type ErrorResponse {
ErrorResponse(
error_type: String,
id: Int,
error: errors.ErrorCode,
message: String,
stacktrace: option.Option(String),
extensible: List(#(String, json.Json)),
)
}
Constructors
-
ErrorResponse( error_type: String, id: Int, error: errors.ErrorCode, message: String, stacktrace: option.Option(String), extensible: List(#(String, json.Json)), )
pub type ResultData {
SessionResult(session_result: definition.SessionResult)
BrowsingContextResult(
browsing_context_result: definition.BrowsingContextResult,
)
ScriptResult(script_result: definition.ScriptResult)
EmptyResult
}
Constructors
-
SessionResult(session_result: definition.SessionResult) -
BrowsingContextResult( browsing_context_result: definition.BrowsingContextResult, ) -
ScriptResult(script_result: definition.ScriptResult) -
EmptyResult
Values
pub fn command_data_to_json(
command_data: CommandData,
) -> json.Json
pub fn command_response_decoder(
command: CommandData,
) -> decode.Decoder(CommandResponse)
pub fn empty_params_to_json(
empty_params: EmptyParams,
) -> json.Json
pub fn error_response_decoder() -> decode.Decoder(ErrorResponse)
pub fn extensible_command_response_decoder() -> decode.Decoder(
dict.Dict(String, dynamic.Dynamic),
)
pub fn extensible_error_response_decoder() -> decode.Decoder(
dict.Dict(String, dynamic.Dynamic),
)
pub fn message_decoder() -> decode.Decoder(Message)
pub fn new_error_response(
error_type: String,
message: String,
) -> ErrorResponse