pub struct KipArgs {
pub command: Option<String>,
pub operations: Option<Vec<KipOperation>>,
pub execution: Option<Execution>,
pub read: Option<ReadBinding>,
pub parameters: Option<Map<String, Json>>,
pub dry_run: Option<bool>,
}Expand description
The model-facing arguments of execute_kip and execute_kip_readonly.
KIP 2.0’s bundled tool definitions let a model send a single command, or an
operations array whose items may be bare strings, and put dry_run at the
top level. That is deliberately easier to write than the wire Request,
which carries the protocol tag, nests dry_run under options, and rejects
unknown fields. This type is the bridge, so what the model was shown and what
the engine executes are the same thing.
Fields§
§command: Option<String>A single complete KIP command. Mutually exclusive with operations.
operations: Option<Vec<KipOperation>>Several KIP commands in one round-trip.
execution: Option<Execution>How the operations relate to one another.
read: Option<ReadBinding>The read coordinate to bind every operation to.
parameters: Option<Map<String, Json>>Values bound into the commands’ :placeholders.
dry_run: Option<bool>Validate and plan without committing.
Implementations§
Source§impl KipArgs
impl KipArgs
Sourcepub fn into_readonly_request(self) -> Result<Request, KipError>
pub fn into_readonly_request(self) -> Result<Request, KipError>
Builds the read-only tool envelope. Its bundled schema exposes no transaction mode, so a batch defaults to independent reads. Raw wire requests and the writable tool keep KIP’s explicit-mode requirement.
Sourcepub fn into_request(self) -> Result<Request, KipError>
pub fn into_request(self) -> Result<Request, KipError>
Builds the wire envelope these arguments describe.
The command / operations exclusion is checked here rather than left
to Request::validate, because an envelope built from both would
silently run only one of them.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KipArgs
impl<'de> Deserialize<'de> for KipArgs
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>,
Auto Trait Implementations§
impl Freeze for KipArgs
impl RefUnwindSafe for KipArgs
impl Send for KipArgs
impl Sync for KipArgs
impl Unpin for KipArgs
impl UnsafeUnpin for KipArgs
impl UnwindSafe for KipArgs
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more