pub enum ExternalEventResult {
Received(Option<String>),
TimedOut,
}Expand description
Result of waiting for an external event with a timeout.
Returned by OrchestrationContext::wait_for_external_event_with_timeout.
Variants§
Received(Option<String>)
Event received before the timeout.
Raw JSON payload, or None if the event carried no data.
TimedOut
Event not received before the timeout.
Implementations§
Source§impl ExternalEventResult
impl ExternalEventResult
Sourcepub fn is_received(&self) -> bool
pub fn is_received(&self) -> bool
true if the event was received.
Sourcepub fn is_timed_out(&self) -> bool
pub fn is_timed_out(&self) -> bool
true if the wait timed out.
Sourcepub fn deserialize<T: DeserializeOwned>(&self) -> Option<Result<T>>
pub fn deserialize<T: DeserializeOwned>(&self) -> Option<Result<T>>
Deserialise the payload, returning None if timed out or absent.
Trait Implementations§
Source§impl Clone for ExternalEventResult
impl Clone for ExternalEventResult
Source§fn clone(&self) -> ExternalEventResult
fn clone(&self) -> ExternalEventResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExternalEventResult
impl Debug for ExternalEventResult
impl Eq for ExternalEventResult
Source§impl PartialEq for ExternalEventResult
impl PartialEq for ExternalEventResult
Source§fn eq(&self, other: &ExternalEventResult) -> bool
fn eq(&self, other: &ExternalEventResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExternalEventResult
Auto Trait Implementations§
impl Freeze for ExternalEventResult
impl RefUnwindSafe for ExternalEventResult
impl Send for ExternalEventResult
impl Sync for ExternalEventResult
impl Unpin for ExternalEventResult
impl UnsafeUnpin for ExternalEventResult
impl UnwindSafe for ExternalEventResult
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request