pub struct ActRequest {
pub actions: Vec<Action>,
pub observe: bool,
pub settle_ms: u16,
}Expand description
Body of POST /sessions/{id}/act.
Fields§
§actions: Vec<Action>§observe: boolWhether to end with a screenshot.
settle_ms: u16Pause before the closing screenshot, in milliseconds.
Implementations§
Source§impl ActRequest
impl ActRequest
Sourcepub fn time_budget(&self) -> Duration
pub fn time_budget(&self) -> Duration
Longest the batch can take: its waits, the settle time, typing, launches, and a fixed allowance for the rest.
Source§impl ActRequest
impl ActRequest
Sourcepub fn parse(
raw: &[RawAction],
observe: Option<bool>,
settle_ms: Option<f64>,
) -> Result<Self, ActionError>
pub fn parse( raw: &[RawAction], observe: Option<bool>, settle_ms: Option<f64>, ) -> Result<Self, ActionError>
Turns the agent’s batch into typed actions and applies every limit.
observe defaults to true and settle_ms to DEFAULT_SETTLE_MS. Waits and
the settle time are capped at MAX_WAIT_MS.
§Errors
Fails when the batch is empty or too long, an action lacks a field it needs, or a number is not usable. The message names the action.
Trait Implementations§
Source§impl Clone for ActRequest
impl Clone for ActRequest
Source§impl Debug for ActRequest
impl Debug for ActRequest
Source§impl<'de> Deserialize<'de> for ActRequest
impl<'de> Deserialize<'de> for ActRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ActRequest
Source§impl PartialEq for ActRequest
impl PartialEq for ActRequest
Source§impl Serialize for ActRequest
impl Serialize for ActRequest
impl StructuralPartialEq for ActRequest
Auto Trait Implementations§
impl Freeze for ActRequest
impl RefUnwindSafe for ActRequest
impl Send for ActRequest
impl Sync for ActRequest
impl Unpin for ActRequest
impl UnsafeUnpin for ActRequest
impl UnwindSafe for ActRequest
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