pub struct Call<T> {
pub request: Request,
/* private fields */
}Expand description
One request and how to read its answer into a T. Build it with a calls module,
send Self::request, then Self::parse the response.
Fields§
§request: RequestThe request to send. Its path is relative to the server (or the cloud).
Implementations§
Source§impl<T> Call<T>
impl<T> Call<T>
Sourcepub fn parse(&self, response: Response) -> Result<T>
pub fn parse(&self, response: Response) -> Result<T>
Reads the response the server gave, whatever its status: a status other than
2xx is read as Error::from_status (or as what the call makes of it: an
expired cloud session is None). Can be called again, for the answer to the
same request sent once more.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Call<T>
impl<T> !UnwindSafe for Call<T>
impl<T> Forget for Call<T>
impl<T> Freeze for Call<T>where
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(String, String)>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
*const dyn Fn(Result<Response, Error>) -> Result<T, Error> + Sync + Send is !null: Freeze,
PhantomData<dyn Fn(Result<Response, Error>) -> Result<T, Error> + Sync + Send>: Freeze,
impl<T> Move for Call<T>
impl<T> Send for Call<T>
impl<T> Sync for Call<T>
impl<T> Unpin for Call<T>
impl<T> UnsafeUnpin for Call<T>where
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
*const dyn Fn(Result<Response, Error>) -> Result<T, Error> + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Fn(Result<Response, Error>) -> Result<T, Error> + Sync + Send>: UnsafeUnpin,
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