Skip to main content

ComputerUseActionResponseDto

Struct ComputerUseActionResponseDto 

Source
pub struct ComputerUseActionResponseDto {
    pub actions: Vec<ComputerUseActionResponseDtoActionsItem>,
    pub memory: Option<String>,
    pub thoughts: Option<String>,
    pub unknown: Option<String>,
}
Expand description

ComputerUseActionResponseDto

JSON schema
{
 "type": "object",
 "required": [
   "actions"
 ],
 "properties": {
   "actions": {
     "type": "array",
     "items": {
       "description": "All possible computer use actions, with optional callId",
       "type": "object",
       "oneOf": [
         {
           "description": "Click the mouse at the specified coordinates",
           "type": "object",
           "required": [
             "button",
             "type",
             "x",
             "y"
           ],
           "properties": {
             "button": {
               "description": "Mouse button flag combination. 1: left, 2: right, 4: middle, 8: back, 16: forward; add them together to press multiple buttons at once.",
               "type": "number"
             },
             "holdKey": {
               "description": "Key to hold down during click, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
               "type": "string"
             },
             "relative": {
               "description": "Whether the coordinates are relative to the current mouse position.",
               "type": "boolean"
             },
             "type": {
               "type": "string",
               "enum": [
                 "mouse:click"
               ]
             },
             "x": {
               "description": "X coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             },
             "y": {
               "description": "Y coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             }
           }
         },
         {
           "description": "Double click the mouse at the specified coordinates",
           "type": "object",
           "required": [
             "button",
             "type",
             "x",
             "y"
           ],
           "properties": {
             "button": {
               "description": "Mouse button index",
               "type": "number"
             },
             "holdKey": {
               "description": "Key to hold down during double click, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
               "type": "string"
             },
             "relative": {
               "description": "Whether the coordinates are relative to the current mouse position.",
               "type": "boolean"
             },
             "type": {
               "type": "string",
               "enum": [
                 "mouse:doubleClick"
               ]
             },
             "x": {
               "description": "X coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             },
             "y": {
               "description": "Y coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             }
           }
         },
         {
           "description": "Triple click the mouse at the specified coordinates",
           "type": "object",
           "required": [
             "button",
             "type",
             "x",
             "y"
           ],
           "properties": {
             "button": {
               "description": "Mouse button index",
               "type": "number"
             },
             "holdKey": {
               "description": "Key to hold down during triple click, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
               "type": "string"
             },
             "relative": {
               "description": "Whether the coordinates are relative to the current mouse position.",
               "type": "boolean"
             },
             "type": {
               "type": "string",
               "enum": [
                 "mouse:tripleClick"
               ]
             },
             "x": {
               "description": "X coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             },
             "y": {
               "description": "Y coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             }
           }
         },
         {
           "description": "Move the mouse to the specified coordinates",
           "type": "object",
           "required": [
             "type",
             "x",
             "y"
           ],
           "properties": {
             "holdKey": {
               "description": "Key to hold down during move, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
               "type": "string"
             },
             "relative": {
               "description": "Whether the coordinates are relative to the current mouse position.",
               "type": "boolean"
             },
             "type": {
               "type": "string",
               "enum": [
                 "mouse:move"
               ]
             },
             "x": {
               "description": "X coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             },
             "y": {
               "description": "Y coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             }
           }
         },
         {
           "description": "Scroll the mouse",
           "type": "object",
           "required": [
             "stepHorizontal",
             "stepVertical",
             "type",
             "x",
             "y"
           ],
           "properties": {
             "holdKey": {
               "description": "Key to hold down during scroll, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
               "type": "string"
             },
             "relative": {
               "description": "Whether the coordinates are relative to the current mouse position.",
               "type": "boolean"
             },
             "stepHorizontal": {
               "description": "Horizontal scroll steps",
               "type": "number"
             },
             "stepVertical": {
               "description": "Vertical scroll steps",
               "type": "number"
             },
             "type": {
               "type": "string",
               "enum": [
                 "mouse:scroll"
               ]
             },
             "x": {
               "description": "X coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             },
             "y": {
               "description": "Y coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             }
           }
         },
         {
           "description": "Drag the mouse from start to end coordinates",
           "type": "object",
           "required": [
             "endX",
             "endY",
             "startX",
             "startY",
             "type"
           ],
           "properties": {
             "button": {
               "description": "Mouse button index",
               "type": "number"
             },
             "endRelative": {
               "description": "Whether the coordinates are relative to the current mouse position.",
               "type": "boolean"
             },
             "endX": {
               "description": "End X coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             },
             "endY": {
               "description": "End Y coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             },
             "holdKey": {
               "description": "Key to hold down during drag, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
               "type": "string"
             },
             "startRelative": {
               "description": "Whether the coordinates are relative to the current mouse position.",
               "type": "boolean"
             },
             "startX": {
               "description": "Start X coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             },
             "startY": {
               "description": "Start Y coordinate",
               "oneOf": [
                 {
                   "description": "Length in pixels",
                   "type": "object",
                   "required": [
                     "type",
                     "value"
                   ],
                   "properties": {
                     "type": {
                       "description": "Indicates the unit is pixel",
                       "type": "string",
                       "enum": [
                         "px"
                       ]
                     },
                     "value": {
                       "description": "Length in pixels",
                       "type": "number"
                     }
                   }
                 },
                 {
                   "description": "Length as a fraction",
                   "type": "object",
                   "required": [
                     "denominator",
                     "numerator",
                     "type"
                   ],
                   "properties": {
                     "denominator": {
                       "description": "Denominator of the fraction",
                       "type": "number"
                     },
                     "numerator": {
                       "description": "Numerator of the fraction",
                       "type": "number"
                     },
                     "type": {
                       "type": "string",
                       "enum": [
                         "/"
                       ]
                     }
                   }
                 }
               ]
             },
             "type": {
               "type": "string",
               "enum": [
                 "mouse:drag"
               ]
             }
           }
         },
         {
           "description": "Type text content",
           "type": "object",
           "required": [
             "content",
             "treatNewLineAsEnter",
             "type"
           ],
           "properties": {
             "content": {
               "description": "Text content to type",
               "type": "string"
             },
             "treatNewLineAsEnter": {
               "description": "Whether to treat line breaks as enter. If true, any line breaks(\\n) in content will be treated as enter key press, and content will be split into multiple lines.",
               "default": false,
               "type": [
                 "boolean",
                 "null"
               ]
             },
             "type": {
               "type": "string",
               "enum": [
                 "keyboard:type"
               ]
             }
           }
         },
         {
           "description": "Press a keyboard hotkey",
           "type": "object",
           "required": [
             "keys",
             "type"
           ],
           "properties": {
             "duration": {
               "description": "Duration in milliseconds. If specified, the hotkey will be held for a while and then released.",
               "type": "number",
               "maximum": 5000.0,
               "minimum": 1.0
             },
             "keys": {
               "description": "Hotkey combination, in xdotool key syntax. Examples: \"a\", \"Return\", \"alt+Tab\", \"ctrl+s\", \"Up\", \"KP_0\" (for the numpad 0 key).",
               "type": "string"
             },
             "type": {
               "type": "string",
               "enum": [
                 "keyboard:hotkey"
               ]
             }
           }
         },
         {
           "description": "Take a screenshot of the current screen",
           "type": "object",
           "required": [
             "type"
           ],
           "properties": {
             "type": {
               "type": "string",
               "enum": [
                 "screenshot"
               ]
             }
           }
         },
         {
           "description": "Wait for a specified duration",
           "type": "object",
           "required": [
             "duration",
             "type"
           ],
           "properties": {
             "duration": {
               "description": "Duration in milliseconds",
               "type": "number"
             },
             "type": {
               "type": "string",
               "enum": [
                 "wait"
               ]
             }
           }
         },
         {
           "description": "Indicates the action has finished",
           "type": "object",
           "required": [
             "type"
           ],
           "properties": {
             "message": {
               "description": "Completion message",
               "type": "string"
             },
             "type": {
               "type": "string",
               "enum": [
                 "finished"
               ]
             }
           }
         },
         {
           "description": "Indicates the action has failed",
           "type": "object",
           "required": [
             "type"
           ],
           "properties": {
             "message": {
               "description": "Failure message",
               "type": "string"
             },
             "type": {
               "type": "string",
               "enum": [
                 "failed"
               ]
             }
           }
         },
         {
           "description": "Indicates the human user should take over the control",
           "type": "object",
           "required": [
             "type"
           ],
           "properties": {
             "type": {
               "type": "string",
               "enum": [
                 "client:user-takeover"
               ]
             }
           }
         },
         {
           "description": "Press ONE key down, in xdotool key syntax. Only use this action if hotkey or type cannot satisfy your needs.",
           "type": "object",
           "required": [
             "key",
             "type"
           ],
           "properties": {
             "key": {
               "description": "Key to press",
               "type": "string"
             },
             "type": {
               "type": "string",
               "enum": [
                 "key:down"
               ]
             }
           }
         },
         {
           "description": "Release ONE key, in xdotool key syntax. Only use this action if keydown cannot satisfy your needs and only after a key down.",
           "type": "object",
           "required": [
             "key",
             "type"
           ],
           "properties": {
             "key": {
               "description": "Key to release",
               "type": "string"
             },
             "type": {
               "type": "string",
               "enum": [
                 "key:up"
               ]
             }
           }
         }
       ],
       "properties": {
         "callId": {
           "description": "Optional call identifier",
           "type": "string"
         }
       }
     }
   },
   "memory": {
     "description": "Memory that is not parsed",
     "type": "string"
   },
   "thoughts": {
     "description": "Thoughts that are not parsed",
     "type": "string"
   },
   "unknown": {
     "description": "Unknown text that is not thoughts nor actions, commonly due to the misformat of model output",
     "type": "string"
   }
 }
}

Fields§

§actions: Vec<ComputerUseActionResponseDtoActionsItem>§memory: Option<String>

Memory that is not parsed

§thoughts: Option<String>

Thoughts that are not parsed

§unknown: Option<String>

Unknown text that is not thoughts nor actions, commonly due to the misformat of model output

Trait Implementations§

Source§

impl Clone for ComputerUseActionResponseDto

Source§

fn clone(&self) -> ComputerUseActionResponseDto

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ComputerUseActionResponseDto

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ComputerUseActionResponseDto

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&ComputerUseActionResponseDto> for ComputerUseActionResponseDto

Source§

fn from(value: &ComputerUseActionResponseDto) -> Self

Converts to this type from the input type.
Source§

impl Serialize for ComputerUseActionResponseDto

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more