A better Rust ATProto crate
at main 1.7 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.ocho.state.login 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8#[jacquard_derive::lexicon] 9#[derive( 10 serde::Serialize, 11 serde::Deserialize, 12 Debug, 13 Clone, 14 PartialEq, 15 Eq, 16 jacquard_derive::IntoStatic, 17 Default 18)] 19#[serde(rename_all = "camelCase")] 20pub struct LoginOutput<'a> { 21 /// The code used to login on the InstantDB website 22 #[serde(borrow)] 23 pub code: jacquard_common::CowStr<'a>, 24} 25 26/// XRPC request marker type 27#[derive( 28 Debug, 29 Clone, 30 Copy, 31 PartialEq, 32 Eq, 33 serde::Serialize, 34 serde::Deserialize, 35 jacquard_derive::IntoStatic 36)] 37pub struct Login; 38///Response type for 39///app.ocho.state.login 40pub struct LoginResponse; 41impl jacquard_common::xrpc::XrpcResp for LoginResponse { 42 const NSID: &'static str = "app.ocho.state.login"; 43 const ENCODING: &'static str = "application/json"; 44 type Output<'de> = LoginOutput<'de>; 45 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 46} 47 48impl jacquard_common::xrpc::XrpcRequest for Login { 49 const NSID: &'static str = "app.ocho.state.login"; 50 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 51 type Response = LoginResponse; 52} 53 54///Endpoint type for 55///app.ocho.state.login 56pub struct LoginRequest; 57impl jacquard_common::xrpc::XrpcEndpoint for LoginRequest { 58 const PATH: &'static str = "/xrpc/app.ocho.state.login"; 59 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 60 type Request<'de> = Login; 61 type Response = LoginResponse; 62}