#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct Greeting<'a> {
#[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>,
}
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;
}
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;
}