pub enum EffectScope {
Turn {
session_id: String,
turn_id: String,
},
Process {
process_id: String,
},
QueueDrain {
session_id: String,
drain_id: String,
},
SessionDelete {
session_id: String,
},
RuntimeOperation {
operation_id: String,
},
}Expand description
Stable semantic identity for one effectful runtime operation.
The scope is chosen by the host boundary before any nondeterministic work is planned. It is intentionally generic: Restate, an inline test host, or a future durable effect host all receive the same Lash scope vocabulary.
Variants§
Implementations§
Source§impl EffectScope
impl EffectScope
pub fn turn(session_id: impl Into<String>, turn_id: impl Into<String>) -> Self
pub fn process(process_id: impl Into<String>) -> Self
pub fn queue_drain( session_id: impl Into<String>, drain_id: impl Into<String>, ) -> Self
pub fn session_delete(session_id: impl Into<String>) -> Self
pub fn runtime_operation(operation_id: impl Into<String>) -> Self
pub fn id(&self) -> &str
pub fn session_id(&self) -> Option<&str>
pub fn turn_id(&self) -> Option<&str>
pub fn validates_turn_trace_id(&self) -> bool
Trait Implementations§
Source§impl Clone for EffectScope
impl Clone for EffectScope
Source§fn clone(&self) -> EffectScope
fn clone(&self) -> EffectScope
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 EffectScope
impl Debug for EffectScope
Source§impl<'de> Deserialize<'de> for EffectScope
impl<'de> Deserialize<'de> for EffectScope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EffectScope
Source§impl PartialEq for EffectScope
impl PartialEq for EffectScope
Source§fn eq(&self, other: &EffectScope) -> bool
fn eq(&self, other: &EffectScope) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EffectScope
impl Serialize for EffectScope
impl StructuralPartialEq for EffectScope
Auto Trait Implementations§
impl Freeze for EffectScope
impl RefUnwindSafe for EffectScope
impl Send for EffectScope
impl Sync for EffectScope
impl Unpin for EffectScope
impl UnsafeUnpin for EffectScope
impl UnwindSafe for EffectScope
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