Skip to main content

ObserveRunsRequest

Struct ObserveRunsRequest 

Source
pub struct ObserveRunsRequest {
    pub spool: Option<SpoolRef>,
    pub threads: Vec<ThreadRef>,
    pub runs: Vec<RecordRef>,
    pub include_timeline: bool,
    pub page: Option<PageRequest>,
    pub observe: Option<ObserveOptions>,
    pub timeline_start: i32,
    pub timeline_limit: u32,
}

Fields§

§spool: Option<SpoolRef>§threads: Vec<ThreadRef>§runs: Vec<RecordRef>§include_timeline: bool§page: Option<PageRequest>§observe: Option<ObserveOptions>§timeline_start: i32

LATEST requires include_timeline, exactly one run in runs, FOLLOW (or the default mode), a positive timeline_limit, and no page request. The initial snapshot includes the selected RunRecord and policy, when present, plus at most timeline_limit records, ordered by position from oldest to newest. Its PageInfo is exhausted with an empty next_page when the selection fits. When mandatory run/policy and each whole timeline record fit, budget-limited snapshots return timeline PARTIAL with an empty next_page and page.exhausted=false. The checkpoint cursor retains the fixed initial latest-N lower/upper boundary and last delivered position. The first snapshot_complete=true commits staging, not completeness of coverage. Deliver the fixed remainder in bounded UPSERT batches on this stream or after resume, before following newer positions. The last remainder batch has timeline COMPLETE, page.exhausted=true and empty next_page, then a checkpoint. Charge all remainder payloads/statuses/checkpoints to budget. Impossible fixed request/control overhead (including the terminal-failure reserve in ReadBudget) is INVALID_ARGUMENT before matching. ObserveRuns has no guaranteed whole-record bound: after authorization/projection, a RunRecord, RunPolicy or TimelineRecord that cannot fit an empty legal batch with controls, or a mandatory initial run/policy set that cannot fit the initial snapshot, ends with CallFailure RESOURCE_EXHAUSTED, message exactly “indivisible result exceeds read budget”, no ErrorDetail or retry hint. Apply this in default/LATEST mode, initial/resumed/live batches; charge the reserved failure item/bytes. Discard uncommitted staging and keep only the last committed cursor. Never omit pending permissions/policy, truncate exact intent bytes or loop PARTIAL/Reset. Same-budget automatic retries are forbidden. Default UNSPECIFIED retains oldest-first paging and WindowChanged resets when a non-exhausted page changes. In LATEST, new positions append after the fixed initial selection; they MUST NOT trigger WindowChanged merely because more than timeline_limit records now exist. A genuine loss of continuity or removal may still reset the stream.

§timeline_limit: u32

Number of latest timeline records to include in the initial snapshot. Valid only with timeline_start = TIMELINE_START_LATEST; otherwise zero.

ObserveOptions.after_cursor is a stream resume cursor, never a page token. It is bound to timeline_start, timeline_limit and the run filter. Successful after_cursor resume delivers the retained initial remainder before following later positions, without selecting a new latest N; if replay or the fixed boundary/remainder is unavailable, or a genuine removal loses continuity, the server sends a terminal reset. Recheck live authorization at each handoff. The client reconnects without after_cursor to start a replacement latest snapshot. PageRequest.after_page is invalid in LATEST mode.

Implementations§

Source§

impl ObserveRunsRequest

Source

pub fn timeline_start(&self) -> TimelineStart

Returns the enum value of timeline_start, or the default if the field is set to an invalid enum value.

Source

pub fn set_timeline_start(&mut self, value: TimelineStart)

Sets timeline_start to the provided enum value.

Trait Implementations§

Source§

impl Clone for ObserveRunsRequest

Source§

fn clone(&self) -> ObserveRunsRequest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ObserveRunsRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for ObserveRunsRequest

Source§

fn default() -> ObserveRunsRequest

Returns the “default value” for a type. Read more
Source§

impl Message for ObserveRunsRequest

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8> ⓘ
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘ
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl ObservationRequest for ObserveRunsRequest

Source§

fn options_mut(&mut self) -> &mut ObserveOptions

Source§

impl PartialEq for ObserveRunsRequest

Source§

fn eq(&self, other: &ObserveRunsRequest) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ObserveRunsRequest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more