A better Rust ATProto crate
at main 2.0 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: sh.tangled.repo.create 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 Create<'a> { 21 /// Default branch to push to 22 #[serde(skip_serializing_if = "std::option::Option::is_none")] 23 #[serde(borrow)] 24 pub default_branch: std::option::Option<jacquard_common::CowStr<'a>>, 25 /// Rkey of the repository record 26 #[serde(borrow)] 27 pub rkey: jacquard_common::CowStr<'a>, 28 /// A source URL to clone from, populate this when forking or importing a repository. 29 #[serde(skip_serializing_if = "std::option::Option::is_none")] 30 #[serde(borrow)] 31 pub source: std::option::Option<jacquard_common::CowStr<'a>>, 32} 33 34///Response type for 35///sh.tangled.repo.create 36pub struct CreateResponse; 37impl jacquard_common::xrpc::XrpcResp for CreateResponse { 38 const NSID: &'static str = "sh.tangled.repo.create"; 39 const ENCODING: &'static str = "application/json"; 40 type Output<'de> = (); 41 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 42} 43 44impl<'a> jacquard_common::xrpc::XrpcRequest for Create<'a> { 45 const NSID: &'static str = "sh.tangled.repo.create"; 46 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 47 "application/json", 48 ); 49 type Response = CreateResponse; 50} 51 52///Endpoint type for 53///sh.tangled.repo.create 54pub struct CreateRequest; 55impl jacquard_common::xrpc::XrpcEndpoint for CreateRequest { 56 const PATH: &'static str = "/xrpc/sh.tangled.repo.create"; 57 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 58 "application/json", 59 ); 60 type Request<'de> = Create<'de>; 61 type Response = CreateResponse; 62}