pub struct UmbralSocket { /* private fields */ }Implementations§
Source§impl UmbralSocket
impl UmbralSocket
pub fn new(socket: &str) -> UmbralSocket
pub async fn get<U: DeserializeOwned>( &self, endpoint: &str, ) -> Result<UmbralResponse<U>, Box<dyn Error>>
pub async fn post<T: Serialize, U: DeserializeOwned>( &self, endpoint: &str, request: &T, ) -> Result<UmbralResponse<U>, Box<dyn Error>>
pub async fn post_raw<T: Serialize>( &self, endpoint: &str, request: &T, ) -> Result<UmbralResponse<()>, Box<dyn Error>>
pub async fn post_trigger( &self, endpoint: &str, ) -> Result<UmbralResponse<()>, Box<dyn Error>>
Trait Implementations§
Source§impl Clone for UmbralSocket
impl Clone for UmbralSocket
Source§fn clone(&self) -> UmbralSocket
fn clone(&self) -> UmbralSocket
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 UmbralSocket
impl !RefUnwindSafe for UmbralSocket
impl Send for UmbralSocket
impl Sync for UmbralSocket
impl Unpin for UmbralSocket
impl !UnwindSafe for UmbralSocket
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