pub struct PortClient { /* private fields */ }Implementations§
Source§impl PortClient
impl PortClient
pub fn builder() -> PortClientBuilder
pub fn from_config(config: PortConfig) -> Result<Self, PortError>
pub fn from_env() -> Result<Self, PortError>
pub fn base_url(&self) -> &Url
pub fn tracker(&self) -> ResourceTrackerHandle
pub fn telemetry(&self) -> &TelemetryConfig
pub fn record_creation(&self, resource_type: &str, identifier: &str)
pub fn record_deletion(&self, resource_type: &str, identifier: &str)
pub async fn get<T>(&self, path: &str) -> Result<T, PortError>where
T: DeserializeOwned,
pub async fn get_with_query<T, Q>( &self, path: &str, query: &Q, ) -> Result<T, PortError>
pub async fn get_paginated<T, Q>( &self, path: &str, query: &Q, pagination: &Pagination, ) -> Result<T, PortError>
pub async fn post<B, T>(&self, path: &str, body: &B) -> Result<T, PortError>
pub async fn put<B, T>(&self, path: &str, body: &B) -> Result<T, PortError>
pub async fn patch<B, T>(&self, path: &str, body: &B) -> Result<T, PortError>
pub async fn delete<T>(&self, path: &str) -> Result<T, PortError>where
T: DeserializeOwned,
pub async fn delete_with_query<T, Q>( &self, path: &str, query: &Q, ) -> Result<T, PortError>
Trait Implementations§
Source§impl Clone for PortClient
impl Clone for PortClient
Source§fn clone(&self) -> PortClient
fn clone(&self) -> PortClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PortClient
impl !RefUnwindSafe for PortClient
impl Send for PortClient
impl Sync for PortClient
impl Unpin for PortClient
impl UnsafeUnpin for PortClient
impl !UnwindSafe for PortClient
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