pub trait EmbeddedTraceApi {
// Required methods
fn embedded_trace_api_version(&self) -> &'static str;
fn trace_list(
&self,
requested_version: &str,
page_size: usize,
cursor: Option<&str>,
) -> Result<EmbeddedTracePage, EmbeddedTraceApiError>;
fn trace_get(
&self,
requested_version: &str,
trace_id: &str,
) -> Result<EmbeddedTraceDetail, EmbeddedTraceApiError>;
}Expand description
The additive embedded-trace-api/1.0.0 companion surface (spec 517).
This trait intentionally does not alter TraverseEmbedderApi. A host
that implements it provides trace.list and trace.get over a bounded,
process-local safe projection; callers must request the advertised version.
Required Methods§
Sourcefn embedded_trace_api_version(&self) -> &'static str
fn embedded_trace_api_version(&self) -> &'static str
Returns the companion API version advertised by this host.
Sourcefn trace_list(
&self,
requested_version: &str,
page_size: usize,
cursor: Option<&str>,
) -> Result<EmbeddedTracePage, EmbeddedTraceApiError>
fn trace_list( &self, requested_version: &str, page_size: usize, cursor: Option<&str>, ) -> Result<EmbeddedTracePage, EmbeddedTraceApiError>
trace.list: returns a deterministic page of safe local summaries.
§Errors
Returns a stable API error when the requested version is unsupported, the page size is invalid, or the opaque cursor is malformed or belongs to another host session.
Sourcefn trace_get(
&self,
requested_version: &str,
trace_id: &str,
) -> Result<EmbeddedTraceDetail, EmbeddedTraceApiError>
fn trace_get( &self, requested_version: &str, trace_id: &str, ) -> Result<EmbeddedTraceDetail, EmbeddedTraceApiError>
trace.get: returns one safe retained local trace detail.
§Errors
Returns a stable API error when the requested version is unsupported, the trace identifier is malformed, or the retained trace is absent.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".