pub enum CallResponse<Out> {
Response(Out),
Poll(RequestId),
}
Expand description
The response from a request to the call
endpoint.
Variants§
Response(Out)
The call completed, and the response is available.
Poll(RequestId)
The replica timed out the update call, and the request id should be used to poll for the response
using the Agent::wait
method.
Implementations§
source§impl<Out> CallResponse<Out>
impl<Out> CallResponse<Out>
sourcepub fn map<Out2>(self, f: impl FnOnce(Out) -> Out2) -> CallResponse<Out2>
pub fn map<Out2>(self, f: impl FnOnce(Out) -> Out2) -> CallResponse<Out2>
Maps the inner value, if this is Response
.
source§impl<T, E> CallResponse<Result<T, E>>
impl<T, E> CallResponse<Result<T, E>>
sourcepub fn transpose(self) -> Result<CallResponse<T>, E>
pub fn transpose(self) -> Result<CallResponse<T>, E>
Extracts an inner Result
, if this is Response
.
source§impl<T> CallResponse<Option<T>>
impl<T> CallResponse<Option<T>>
sourcepub fn transpose(self) -> Option<CallResponse<T>>
pub fn transpose(self) -> Option<CallResponse<T>>
Extracts an inner Option
, if this is Response
.
source§impl<T> CallResponse<(T,)>
impl<T> CallResponse<(T,)>
sourcepub fn detuple(self) -> CallResponse<T>
pub fn detuple(self) -> CallResponse<T>
Extracts the inner value of a 1-tuple, if this is Response
.`
Trait Implementations§
source§impl<Out> Clone for CallResponse<Out>where
Out: Clone,
impl<Out> Clone for CallResponse<Out>where
Out: Clone,
source§fn clone(&self) -> CallResponse<Out>
fn clone(&self) -> CallResponse<Out>
Returns a copy 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 moresource§impl<Out> Debug for CallResponse<Out>where
Out: Debug,
impl<Out> Debug for CallResponse<Out>where
Out: Debug,
source§impl<Out> Hash for CallResponse<Out>where
Out: Hash,
impl<Out> Hash for CallResponse<Out>where
Out: Hash,
source§impl<Out> PartialEq for CallResponse<Out>where
Out: PartialEq,
impl<Out> PartialEq for CallResponse<Out>where
Out: PartialEq,
impl<Out> Eq for CallResponse<Out>where
Out: Eq,
impl<Out> StructuralPartialEq for CallResponse<Out>
Auto Trait Implementations§
impl<Out> Freeze for CallResponse<Out>where
Out: Freeze,
impl<Out> RefUnwindSafe for CallResponse<Out>where
Out: RefUnwindSafe,
impl<Out> Send for CallResponse<Out>where
Out: Send,
impl<Out> Sync for CallResponse<Out>where
Out: Sync,
impl<Out> Unpin for CallResponse<Out>where
Out: Unpin,
impl<Out> UnwindSafe for CallResponse<Out>where
Out: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)