#[non_exhaustive]pub struct SessionTracesResponse {
pub links: Vec<SpanLinkItem>,
pub next_cursor: String,
pub schema: String,
pub session: SessionItem,
pub traces: Vec<TraceDetail>,
}Expand description
The composite session view on the span model — one page of it. The page
is bounded in traces (limit) and in bytes; session and links are
whole on every page.
Models the contract’s SessionTracesResponse schema.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.links: Vec<SpanLinkItem>The contract’s links.
next_cursor: StringContinues the walk from the last trace of this page (pass it as
cursor). Empty once the page reached the session’s last trace. A
page may close short of limit on its byte budget, so its absence —
not the page’s length — is what means “no more”.
schema: StringThe contract’s schema.
session: SessionItemThe contract’s session.
traces: Vec<TraceDetail>The contract’s traces.
Implementations§
Source§impl SessionTracesResponse
impl SessionTracesResponse
Sourcepub fn take_page(&mut self) -> Page<TraceDetail>
pub fn take_page(&mut self) -> Page<TraceDetail>
Take this page’s paged part out, leaving the envelope behind.
Only traces is paged; session, links, and schema repeat on
every page and stay put. What comes out is exactly
crate::page::Page, so a walk over a session’s traces reaches the
same loop, the same three spellings of “no more pages”, and the same
guard against a repeated cursor as every listing. next_cursor goes
with the page — it belongs to the walk, not to the session — so the
envelope left behind is what the whole composite looks like once the
walk is done.
Not into_page: the envelope carries facts a page cannot, and a
conversion that discarded them would have to be undone by every walk.