pub struct ToolClient { /* private fields */ }Expand description
A running tool.
Implementations§
Source§impl ToolClient
impl ToolClient
Sourcepub fn start(program: &str, args: &[&str]) -> Result<Self, String>
pub fn start(program: &str, args: &[&str]) -> Result<Self, String>
Starts program args… (dspk tool serve, or podman run … dspk tool serve) and shakes
hands: its description is read, its tool protocol checked, its operations checked.
pub fn description(&self) -> &ToolDescription
Sourcepub fn validate(
&mut self,
operation: &str,
recipe: &Value,
) -> Result<Validation, String>
pub fn validate( &mut self, operation: &str, recipe: &Value, ) -> Result<Validation, String>
Whether recipe is one operation can run, and if not, why.
Auto Trait Implementations§
impl Forget for ToolClient
impl Freeze for ToolClientwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
I32NotAllOnes: Freeze,
*const [MaybeUninit<u8>] is !null: Freeze,
PhantomData<[MaybeUninit<u8>]>: Freeze,
PhantomData<Operation>: Freeze,
impl Move for ToolClient
impl RefUnwindSafe for ToolClientwhere
I32NotAllOnes: RefUnwindSafe,
impl Send for ToolClient
impl Sync for ToolClient
impl Unpin for ToolClient
impl UnsafeUnpin for ToolClientwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
I32NotAllOnes: UnsafeUnpin,
*const [MaybeUninit<u8>] is !null: UnsafeUnpin,
PhantomData<[MaybeUninit<u8>]>: UnsafeUnpin,
PhantomData<Operation>: UnsafeUnpin,
impl UnwindSafe for ToolClientwhere
RawVecInner: UnwindSafe,
I32NotAllOnes: UnwindSafe,
BoxRaw<[MaybeUninit<u8>]>: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
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