pub struct SystemStatusTool {
pub id: String,
pub name: String,
pub action: String,
pub description: String,
pub success: Option<bool>,
pub message: Option<String>,
pub confirm: Option<bool>,
}
Expand description
#[cfg(test)]
mod tests {
use crate::{system_status_tools::SystemStatusTool, ApiClient};
#[tokio::test]
async fn test_list_all_retrieve_run_system_status_tool() {
let id = "regenerate_thumbnails";
let client = ApiClient::from_env().unwrap();
let result = client
.list_all::<SystemStatusTool>(crate::Entity::SystemStatusTool)
.await
.unwrap();
assert!(!result.is_empty());
let retrieved = client
.retrieve::<SystemStatusTool>(crate::Entity::SystemStatusTool, id)
.await
.unwrap();
assert_eq!(retrieved.id, id);
let r = client.run_system_status_tool(id).await.unwrap();
assert!(r.success.unwrap())
}
}
Fields§
§id: String
A unique identifier for the tool.
name: String
Tool name.
action: String
What running the tool will do.
description: String
Tool description.
success: Option<bool>
Did the tool run successfully?
message: Option<String>
Tool return message.
confirm: Option<bool>
Confirm execution of the tool. Default is false.
Trait Implementations§
source§impl Clone for SystemStatusTool
impl Clone for SystemStatusTool
source§fn clone(&self) -> SystemStatusTool
fn clone(&self) -> SystemStatusTool
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SystemStatusTool
impl Debug for SystemStatusTool
source§impl<'de> Deserialize<'de> for SystemStatusTool
impl<'de> Deserialize<'de> for SystemStatusTool
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
Auto Trait Implementations§
impl Freeze for SystemStatusTool
impl RefUnwindSafe for SystemStatusTool
impl Send for SystemStatusTool
impl Sync for SystemStatusTool
impl Unpin for SystemStatusTool
impl UnwindSafe for SystemStatusTool
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