Skip to main content

RunBuilderOptions

Struct RunBuilderOptions 

Source
pub struct RunBuilderOptions { /* private fields */ }
Expand description

Options for assembling a completed Run artifact.

This API is for completed evidence assembly (for example, import/conversion paths), not live request instrumentation. Normal live instrumentation should use crate::Tailtriage::builder.

When omitted:

  • mode defaults to CaptureMode::Light
  • capture limits default to mode.core_defaults()
  • host and pid remain None
  • run id uses the same core run-id generator as live capture
  • timestamps are filled from one captured current unix-ms value

finalized_at_unix_ms is always Some(...) for RunBuilder output.

Implementations§

Source§

impl RunBuilderOptions

Source

pub fn new(service_name: impl Into<String>) -> Self

Creates options with a required service name.

Source

pub fn service_version(self, service_version: impl Into<String>) -> Self

Sets optional service version metadata.

Source

pub fn run_id(self, run_id: impl Into<String>) -> Self

Sets a caller-provided run identifier.

Source

pub fn mode(self, mode: CaptureMode) -> Self

Sets capture mode.

Source

pub fn capture_limits(self, capture_limits: CaptureLimits) -> Self

Sets effective capture limits for this completed run artifact.

Source

pub const fn strict_lifecycle(self, strict_lifecycle: bool) -> Self

Sets strict lifecycle flag recorded in effective core config.

Source

pub const fn started_at_unix_ms(self, started_at_unix_ms: u64) -> Self

Sets start timestamp in unix milliseconds.

Source

pub const fn finished_at_unix_ms(self, finished_at_unix_ms: u64) -> Self

Sets finish timestamp in unix milliseconds.

Source

pub const fn finalized_at_unix_ms(self, finalized_at_unix_ms: u64) -> Self

Sets finalization timestamp in unix milliseconds.

Source

pub fn host(self, host: impl Into<String>) -> Self

Sets optional host metadata.

Source

pub const fn pid(self, pid: u32) -> Self

Sets optional process identifier metadata.

Source

pub const fn run_end_reason(self, run_end_reason: RunEndReason) -> Self

Sets optional run-end reason metadata.

Trait Implementations§

Source§

impl Clone for RunBuilderOptions

Source§

fn clone(&self) -> RunBuilderOptions

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 RunBuilderOptions

Source§

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

Formats the value using the given formatter. Read more

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<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, 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.