pub struct Transport { /* private fields */ }Implementations§
Source§impl Transport
impl Transport
pub fn new(base_url: impl Into<String>) -> Self
pub fn with_client(base_url: impl Into<String>, client: Client) -> Self
pub fn with_headers( self, f: impl Fn() -> HeaderMap + Send + Sync + 'static, ) -> Self
pub fn base_url(&self) -> &str
pub async fn call<I: Serialize + Validate, O: DeserializeOwned>( &self, path: &str, method: Method, input: &I, options: Option<&CallOptions>, ) -> Result<O, Error>
pub async fn call_rest<I: Serialize + Validate, O: DeserializeOwned>( &self, path: &str, method: Method, input: &I, drop: &[&str], options: Option<&CallOptions>, ) -> Result<O, Error>
pub fn subscribe<I: Serialize + Validate, O: DeserializeOwned + Send + 'static>( &self, path: &str, method: Method, input: &I, options: Option<&CallOptions>, ) -> impl Stream<Item = Result<O, Error>> + Send + 'static
pub fn subscribe_rest<I: Serialize + Validate, O: DeserializeOwned + Send + 'static>( &self, path: &str, method: Method, input: &I, drop: &[&str], options: Option<&CallOptions>, ) -> impl Stream<Item = Result<O, Error>> + Send + 'static
pub async fn upload<I: Serialize + Validate, O: DeserializeOwned>( &self, path: &str, input: &I, file: Body, filename: &str, options: Option<&CallOptions>, ) -> Result<O, Error>
pub async fn upload_rest<I: Serialize + Validate, O: DeserializeOwned>( &self, path: &str, input: &I, drop: &[&str], file: Body, filename: &str, options: Option<&CallOptions>, ) -> Result<O, Error>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Transport
impl !UnwindSafe for Transport
impl Freeze for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl UnsafeUnpin for Transport
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