pub struct LightspeedClient { /* private fields */ }Implementations§
Source§impl LightspeedClient
impl LightspeedClient
pub fn new( api_server: &str, api_key: &str, api_secret: &str, api_language: &str, ) -> Self
pub async fn create<T: Serialize, R: for<'de> Deserialize<'de>>( &self, url: &str, payload: &T, ) -> Result<R, Box<dyn Error>>
pub async fn read<R: for<'de> Deserialize<'de>>( &self, url: &str, params: Option<Vec<(&str, &str)>>, ) -> Result<R, Box<dyn Error>>
pub async fn update<T: Serialize, R: for<'de> Deserialize<'de>>( &self, url: &str, payload: &T, ) -> Result<R, Box<dyn Error>>
pub async fn delete<R: for<'de> Deserialize<'de>>( &self, url: &str, ) -> Result<R, Box<dyn Error>>
Auto Trait Implementations§
impl Freeze for LightspeedClient
impl !RefUnwindSafe for LightspeedClient
impl Send for LightspeedClient
impl Sync for LightspeedClient
impl Unpin for LightspeedClient
impl !UnwindSafe for LightspeedClient
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