pub enum ExecutionMode {
Immediate,
Background {
cancellable: bool,
},
Streaming {
cancellable: bool,
item_schema: Value,
},
Live {
item_schema: Value,
},
}Expand description
Completion behavior advertised before invocation.
Variants§
Immediate
Expected to finish in the request/response window.
Background
Returns a durable job handle and may report progress.
Streaming
Produces ordered values, each checked against item_schema, until a
terminal result.
Live
A read that stays current: each item, checked against
item_schema, is the whole result as it is now, sent again whenever
the provider’s answer changes. It ends only when the caller cancels
it, its permission is withdrawn, or the provider fails.
Implementations§
Source§impl ExecutionMode
impl ExecutionMode
pub fn serialize<__S>(
__self: &ExecutionMode,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Source§impl<'de> ExecutionMode
impl<'de> ExecutionMode
pub fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecutionMode, __D::Error>where
__D: Deserializer<'de>,
Source§impl ExecutionMode
impl ExecutionMode
Sourcepub const fn cancellable(&self) -> bool
pub const fn cancellable(&self) -> bool
Whether a caller may cancel a running invocation.
Sourcepub const fn item_schema(&self) -> Option<&Value>
pub const fn item_schema(&self) -> Option<&Value>
What each item of a streaming or live invocation must match; None
for a mode that sends no items.
Trait Implementations§
Source§impl Clone for ExecutionMode
impl Clone for ExecutionMode
Source§impl Debug for ExecutionMode
impl Debug for ExecutionMode
Source§impl Default for ExecutionMode
impl Default for ExecutionMode
Source§impl<'de> Deserialize<'de> for ExecutionMode
impl<'de> Deserialize<'de> for ExecutionMode
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExecutionMode
Source§impl PartialEq for ExecutionMode
impl PartialEq for ExecutionMode
Source§impl Serialize for ExecutionMode
impl Serialize for ExecutionMode
impl StructuralPartialEq for ExecutionMode
Auto Trait Implementations§
impl Forget for ExecutionMode
impl Freeze for ExecutionMode
impl Move for ExecutionMode
impl RefUnwindSafe for ExecutionMode
impl Send for ExecutionMode
impl Sync for ExecutionMode
impl Unpin for ExecutionMode
impl UnsafeUnpin for ExecutionMode
impl UnwindSafe for ExecutionMode
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more