pub struct TakeSnapshotOptions {
pub preset: Option<SnapshotPreset>,
pub include: Vec<SnapshotField>,
pub exclude: Vec<SnapshotField>,
pub app_data: Option<JsonObject>,
}Expand description
Which fields Agent::take_snapshot captures
(TakeSnapshotOptions): the preset’s fields, plus include, minus exclude.
use strands::agent::{SnapshotField, SnapshotPreset, TakeSnapshotOptions};
let options = TakeSnapshotOptions {
preset: Some(SnapshotPreset::Session),
exclude: vec![SnapshotField::Interrupts],
..Default::default()
};Fields§
§preset: Option<SnapshotPreset>The starting set of fields; none when unset.
include: Vec<SnapshotField>Fields added to the preset’s.
exclude: Vec<SnapshotField>Fields removed after the preset and include are applied.
app_data: Option<JsonObject>Application-owned data stored in the snapshot; Strands never reads it (appData).
Implementations§
Source§impl TakeSnapshotOptions
impl TakeSnapshotOptions
Sourcepub fn builder() -> TakeSnapshotOptionsBuilder
pub fn builder() -> TakeSnapshotOptionsBuilder
Create an instance of TakeSnapshotOptions using the builder syntax
Trait Implementations§
Source§impl Clone for TakeSnapshotOptions
impl Clone for TakeSnapshotOptions
Source§impl Debug for TakeSnapshotOptions
impl Debug for TakeSnapshotOptions
Source§impl Default for TakeSnapshotOptions
impl Default for TakeSnapshotOptions
Source§impl From<SnapshotPreset> for TakeSnapshotOptions
impl From<SnapshotPreset> for TakeSnapshotOptions
Source§fn from(preset: SnapshotPreset) -> Self
fn from(preset: SnapshotPreset) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TakeSnapshotOptions
impl PartialEq for TakeSnapshotOptions
impl StructuralPartialEq for TakeSnapshotOptions
Auto Trait Implementations§
impl Freeze for TakeSnapshotOptions
impl RefUnwindSafe for TakeSnapshotOptions
impl Send for TakeSnapshotOptions
impl Sync for TakeSnapshotOptions
impl Unpin for TakeSnapshotOptions
impl UnsafeUnpin for TakeSnapshotOptions
impl UnwindSafe for TakeSnapshotOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreCreates a shared type from an unshared type.