jacquard-api 0.11.0

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

#[allow(unused_imports)]
use alloc::collections::BTreeMap;

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};
use crate::org_passingreads::actor::ProfileView;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ListProfilesOutput<'a> {
    #[serde(borrow)]
    pub profiles: Vec<ProfileView<'a>>,
}

/// XRPC request marker type.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Copy)]
pub struct ListProfiles;
/// Response type for org.passingreads.actor.listProfiles
pub struct ListProfilesResponse;
impl jacquard_common::xrpc::XrpcResp for ListProfilesResponse {
    const NSID: &'static str = "org.passingreads.actor.listProfiles";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = ListProfilesOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl jacquard_common::xrpc::XrpcRequest for ListProfiles {
    const NSID: &'static str = "org.passingreads.actor.listProfiles";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = ListProfilesResponse;
}

/// Endpoint type for org.passingreads.actor.listProfiles
pub struct ListProfilesRequest;
impl jacquard_common::xrpc::XrpcEndpoint for ListProfilesRequest {
    const PATH: &'static str = "/xrpc/org.passingreads.actor.listProfiles";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<'de> = ListProfiles;
    type Response = ListProfilesResponse;
}