pub enum CtxAnswer {
Show 17 variants
Welcome,
Refused {
reason: String,
},
Params {
params: Value,
},
Run(CtxRun),
Secret {
value: Value,
},
SecretFailed {
kind: String,
reason: String,
},
ApiAnswer {
status: u16,
body: Value,
note: Option<String>,
},
HandleAdded,
HandleRefused {
reason: String,
},
Handles {
handles: Vec<CleanupHandle>,
},
ResourceReported,
Resource {
value: Value,
},
ResourceRefused {
reason: String,
},
Connection {
values: BTreeMap<String, Value>,
},
ConnectionEnv {
variables: BTreeMap<String, String>,
},
ConnectionFailed {
kind: String,
reason: String,
},
Error {
reason: String,
},
}Expand description
The agent’s answer to a CtxRequest.
Variants§
Welcome
The handshake succeeded.
Refused
The handshake failed (another protocol); the agent closes the connection.
Params
The run’s parameters, as stored (tagged, decision 138); {} when the DAG takes none.
Run(CtxRun)
The run information.
Secret
The value of the secret asked for: a key’s value as a string, a whole secret as an object of key to value.
SecretFailed
Why the secret asked for can’t be read; the connection stays open.
Fields
ApiAnswer
What the API answered an CtxRequest::ApiCall.
Fields
HandleAdded
The handle is registered.
HandleRefused
Why the handle isn’t registered; the connection stays open.
Handles
The attempt’s handles, in registration order.
Fields
handles: Vec<CleanupHandle>The handles.
ResourceReported
The resource’s value is reported.
Resource
The resource’s value, as stored JSON (tagged).
ResourceRefused
Why the resource’s value can’t be reported or read; the connection stays open.
Connection
The values of the connection asked for, by parameter, as stored JSON (tagged).
ConnectionEnv
The variables of the connection asked for, by name (DB_URL), its files written.
ConnectionFailed
Why the connection asked for can’t be opened; the connection stays open.
Fields
Error
A request the agent can’t answer (one it doesn’t know, out of order); the connection is closed after it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CtxAnswer
impl<'de> Deserialize<'de> for CtxAnswer
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>,
impl Eq for CtxAnswer
Source§impl JsonSchema for CtxAnswer
impl JsonSchema for CtxAnswer
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more