jacquard-api 0.10.2

Generated AT Protocol API bindings for Jacquard
Documentation
// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: mov.danabra.Greeting
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

#[jacquard_derive::lexicon]
#[derive(
    serde::Serialize,
    serde::Deserialize,
    Debug,
    Clone,
    PartialEq,
    Eq,
    jacquard_derive::IntoStatic,
    Default
)]
#[serde(rename_all = "camelCase")]
pub struct Greeting<'a> {
    ///Name to greet.
    #[serde(skip_serializing_if = "std::option::Option::is_none")]
    #[serde(borrow)]
    pub name: std::option::Option<jacquard_common::CowStr<'a>>,
}

#[jacquard_derive::lexicon]
#[derive(
    serde::Serialize,
    serde::Deserialize,
    Debug,
    Clone,
    PartialEq,
    Eq,
    jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct GreetingOutput<'a> {
    #[serde(flatten)]
    #[serde(borrow)]
    pub value: crate::at_inlay::Response<'a>,
}

/// Response type for
///mov.danabra.Greeting
pub struct GreetingResponse;
impl jacquard_common::xrpc::XrpcResp for GreetingResponse {
    const NSID: &'static str = "mov.danabra.Greeting";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = GreetingOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl<'a> jacquard_common::xrpc::XrpcRequest for Greeting<'a> {
    const NSID: &'static str = "mov.danabra.Greeting";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Response = GreetingResponse;
}

/// Endpoint type for
///mov.danabra.Greeting
pub struct GreetingRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GreetingRequest {
    const PATH: &'static str = "/xrpc/mov.danabra.Greeting";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Request<'de> = Greeting<'de>;
    type Response = GreetingResponse;
}