jquants_api_client/api/shared/traits/
builder.rs

1//! API builder trait.
2
3use std::fmt;
4
5use serde::de::DeserializeOwned;
6
7/// Trait for API builders.
8pub trait JQuantsBuilder<R: DeserializeOwned + fmt::Debug> {
9    /// Send the request.
10    fn send(self) -> impl std::future::Future<Output = Result<R, crate::JQuantsError>>;
11
12    /// Send the request without consuming ownership.
13    /// Use only when reusing the builder.
14    fn send_ref(&self) -> impl std::future::Future<Output = Result<R, crate::JQuantsError>>;
15}