pub struct PerWorkflowSubscription {
pub namespace: String,
pub workflow_id: Option<ProtoWorkflowId>,
pub resume_from_seq: Option<u64>,
}Expand description
Subscribe to events for one workflow.
Fields§
§namespace: StringCaller namespace used for adapter-boundary authorisation.
workflow_id: Option<ProtoWorkflowId>Workflow whose events are requested.
resume_from_seq: Option<u64>First per-workflow sequence number the caller wants — not the last seq
already seen. When present, the server replays recorded history events
with seq >= resume_from_seq in order, then splices into the live
stream with no gaps and no duplicates. Sequence numbers start at 1; 0
is rejected as invalid_input. Absent = live tail only (current
behaviour). resume_from_seq = 1 replays the full history.
Only per-workflow subscriptions carry a resume cursor: per-workflow
seq is the only ordering that exists, so FilteredSubscription and
FirehoseSubscription are live-only by design.
RESERVED compaction signal (documentation-only, no code yet): a cursor
older than the earliest retained event yields not_found with
error_type "HistoryCompacted"; callers restart with a fresh
subscription.
Implementations§
Source§impl PerWorkflowSubscription
impl PerWorkflowSubscription
Sourcepub fn resume_from_seq(&self) -> u64
pub fn resume_from_seq(&self) -> u64
Returns the value of resume_from_seq, or the default value if resume_from_seq is unset.
Trait Implementations§
Source§impl Clone for PerWorkflowSubscription
impl Clone for PerWorkflowSubscription
Source§fn clone(&self) -> PerWorkflowSubscription
fn clone(&self) -> PerWorkflowSubscription
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PerWorkflowSubscription
impl Debug for PerWorkflowSubscription
Source§impl Default for PerWorkflowSubscription
impl Default for PerWorkflowSubscription
Source§impl<'de> Deserialize<'de> for PerWorkflowSubscription
impl<'de> Deserialize<'de> for PerWorkflowSubscription
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>,
impl Eq for PerWorkflowSubscription
Source§impl Message for PerWorkflowSubscription
impl Message for PerWorkflowSubscription
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for PerWorkflowSubscription
impl PartialEq for PerWorkflowSubscription
Source§fn eq(&self, other: &PerWorkflowSubscription) -> bool
fn eq(&self, other: &PerWorkflowSubscription) -> bool
self and other values to be equal, and is used by ==.