A better Rust ATProto crate
at oauth 1.2 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: com.atproto.repo.importRepo 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8#[derive( 9 serde::Serialize, 10 serde::Deserialize, 11 Debug, 12 Clone, 13 PartialEq, 14 Eq, 15 bon::Builder 16)] 17#[builder(start_fn = new)] 18#[serde(rename_all = "camelCase")] 19pub struct ImportRepo { 20 pub body: bytes::Bytes, 21} 22 23impl jacquard_common::IntoStatic for ImportRepo { 24 type Output = ImportRepo; 25 fn into_static(self) -> Self::Output { 26 self 27 } 28} 29 30impl jacquard_common::types::xrpc::XrpcRequest for ImportRepo { 31 const NSID: &'static str = "com.atproto.repo.importRepo"; 32 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( 33 "application/vnd.ipld.car", 34 ); 35 const OUTPUT_ENCODING: &'static str = "application/json"; 36 type Output<'de> = (); 37 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; 38 fn encode_body(&self) -> Result<Vec<u8>, jacquard_common::types::xrpc::EncodeError> { 39 Ok(self.body.to_vec()) 40 } 41}