pub struct SocketClient { /* private fields */ }Implementations§
Source§impl SocketClient
impl SocketClient
pub fn new(socket: &str) -> SocketClient
pub async fn get<U: DeserializeOwned>( &self, endpoint: &str, ) -> Result<SocketResponse<U>, Box<dyn Error>>
pub async fn post<T: Serialize, U: DeserializeOwned>( &self, endpoint: &str, request: &T, ) -> Result<SocketResponse<U>, Box<dyn Error>>
pub async fn post_raw<T: Serialize>( &self, endpoint: &str, request: &T, ) -> Result<SocketResponse<()>, Box<dyn Error>>
pub async fn post_trigger( &self, endpoint: &str, ) -> Result<SocketResponse<()>, Box<dyn Error>>
pub async fn post_raw_bytes( &self, endpoint: &str, body: Bytes, ) -> Result<SocketResponse<()>, Box<dyn Error>>
Trait Implementations§
Source§impl Clone for SocketClient
impl Clone for SocketClient
Source§fn clone(&self) -> SocketClient
fn clone(&self) -> SocketClient
Returns a duplicate of the value. Read more
1.0.0 · 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 SocketClient
impl !RefUnwindSafe for SocketClient
impl Send for SocketClient
impl Sync for SocketClient
impl Unpin for SocketClient
impl !UnwindSafe for SocketClient
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