pub enum AdapterResponse {
Ok {
protocol_version: ProtocolVersion,
result: Box<AdapterResult>,
},
Error {
protocol_version: ProtocolVersion,
error: AdapterError,
},
}Expand description
The one JSON response an integration writes to stdout, tagged by outcome.
Variants§
Ok
The operation succeeded and carries its result.
Error
The operation was rejected with a structured error.
Implementations§
Source§impl AdapterResponse
impl AdapterResponse
Sourcepub const fn protocol_version(&self) -> ProtocolVersion
pub const fn protocol_version(&self) -> ProtocolVersion
The protocol version carried by this response, regardless of outcome.
Trait Implementations§
Source§impl Clone for AdapterResponse
impl Clone for AdapterResponse
Source§fn clone(&self) -> AdapterResponse
fn clone(&self) -> AdapterResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AdapterResponse
impl Debug for AdapterResponse
Source§impl<'de> Deserialize<'de> for AdapterResponse
impl<'de> Deserialize<'de> for AdapterResponse
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
Source§impl JsonSchema for AdapterResponse
impl JsonSchema for AdapterResponse
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AdapterResponse
impl PartialEq for AdapterResponse
Source§fn eq(&self, other: &AdapterResponse) -> bool
fn eq(&self, other: &AdapterResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AdapterResponse
impl Serialize for AdapterResponse
impl StructuralPartialEq for AdapterResponse
Auto Trait Implementations§
impl Freeze for AdapterResponse
impl RefUnwindSafe for AdapterResponse
impl Send for AdapterResponse
impl Sync for AdapterResponse
impl Unpin for AdapterResponse
impl UnsafeUnpin for AdapterResponse
impl UnwindSafe for AdapterResponse
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