pub struct UnauthenticatedOpenPaymentsClient {
pub http_client: Client,
}
Expand description
An unauthenticated Open Payments client for making public requests.
This client is used for operations that don’t require authentication, such as retrieving public wallet address information or accessing publicly available resources e.g. public incoming payments.
§Example
use open_payments::client::{UnauthenticatedClient, UnauthenticatedResources};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = UnauthenticatedClient::new();
// This would make an actual HTTP request in a real scenario
// but demonstrates the API usage
let _wallet_address = client.wallet_address().get("https://rafiki.money/alice").await?;
Ok(())
}
Fields§
§http_client: Client
Implementations§
Trait Implementations§
Source§impl BaseClient for UnauthenticatedOpenPaymentsClient
impl BaseClient for UnauthenticatedOpenPaymentsClient
Source§fn http_client(&self) -> &ReqwestClient
fn http_client(&self) -> &ReqwestClient
Returns a reference to the underlying reqwest HTTP client.
Auto Trait Implementations§
impl Freeze for UnauthenticatedOpenPaymentsClient
impl !RefUnwindSafe for UnauthenticatedOpenPaymentsClient
impl Send for UnauthenticatedOpenPaymentsClient
impl Sync for UnauthenticatedOpenPaymentsClient
impl Unpin for UnauthenticatedOpenPaymentsClient
impl !UnwindSafe for UnauthenticatedOpenPaymentsClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more