pub struct PerWorkflowSubscription {
pub namespace: String,
pub workflow_id: Option<WorkflowId>,
pub resume_from_seq: Option<u64>,
}Expand description
Subscribe to events for a single workflow in the caller’s namespace.
Fields§
§namespace: String§workflow_id: Option<WorkflowId>§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 (see those messages).
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 Hash for PerWorkflowSubscription
impl Hash 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§impl Serialize for PerWorkflowSubscription
impl Serialize for PerWorkflowSubscription
impl StructuralPartialEq for PerWorkflowSubscription
Auto Trait Implementations§
impl Freeze for PerWorkflowSubscription
impl RefUnwindSafe for PerWorkflowSubscription
impl Send for PerWorkflowSubscription
impl Sync for PerWorkflowSubscription
impl Unpin for PerWorkflowSubscription
impl UnsafeUnpin for PerWorkflowSubscription
impl UnwindSafe for PerWorkflowSubscription
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
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<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
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>
T in a tonic::Request