Skip to content
YosoiDocs

Rust reference

yosoi

pub crate yosoi

Yosoi’s user-facing Rust SDK.

Use the named SDK namespaces for explicit imports, or [prelude] for common authoring vocabulary. Implementation crates are not re-exported.

Source: crates/yosoi/src/lib.rs:1

Name Kind Summary
action namespace Constructors for the actions collected in a Flow.
archive namespace Local immutable evidence storage and typed references.
assertions namespace Immediate, local Rust predicates over one validated Contract observation.
automation_record namespace Versioned, offline-first automation evidence records.
browser namespace Select an optional browser engine and its explicit execution profile.
contracts namespace Describe typed records and inspect extraction and validation outcomes.
documents namespace Create immutable documents, then parse or locate using a policy.
expect namespace Typed expectations for bounded eventual assertions.
flow namespace Serializable Flow actions, outcomes and validation vocabulary.
locators namespace Describe named outputs and inspect the evidence found in a document.
map namespace Discover pages within an explicitly bounded site scope.
policy namespace Configure the limits and acquisition choices used by SDK operations.
prelude namespace Common SDK imports. Every item here belongs to a public SDK namespace.
request namespace Author page requests, apply a policy, and inspect their results.
search namespace Find candidate URLs and inspect each provider’s bounded, typed outcome.
session namespace Explicit browser authority; the managed APIs compose this same substrate.
surface namespace —
timing namespace Millisecond timeout inputs and runtime deadline scopes.
view namespace Bounded offline views over captured browser observations.
Name Kind Summary
Archive struct One concrete handle to a local .yosoi Archive.
BrowserSurface struct An isolated live browser source, initially detached from observation and control. Call close even after failure; cancellation does not prove an effect was undone.
Continuation enum Whether a failure or local cancellation continues execution or stops a scope.
CountLimit struct Positive potentially-large document or locator count.
DecodedFrame struct Materialized pixel evidence with metadata suitable for bounded agent replies.
Document struct An immutable SDK document. Storage and engine handles remain private.
DocumentId struct Stable caller-provided identity for an immutable document.
DocumentProfile struct Validated interpretation contract for one immutable payload.
EffectivePolicyIdentity struct Versioned SHA-256 identity of canonical, fully resolved policy behavior.
ExecutionError enum Failure from the shared execution boundary, preserving its diagnostic source.
FlowPolicy struct Fallback behavior for failed and locally cancelled Flow steps.
LocateOutcome enum Complete no-match, indeterminate absence, matches, and failures are never collapsed into one empty collection.
PixelRect struct Pixel rectangle in an exact captured raster, with an exclusive right/bottom edge.
Policy struct Complete page, request, document, and locator policy values.
PolicyError enum Errors found while constructing or validating policy values.
ResponseTermination enum Whether the sequence ended without cancellation or observed caller cancellation.
StepLimit struct Positive fixed-width step, depth, or region count.
StopScope enum The execution scope affected by a continuation policy.
Surface struct Reusable immutable index, safe to share between concurrent Rust readers.
SurfaceBudget struct A per-response bound on serialized JSON bytes and returned entries.
SurfaceConnection trait Common lifecycle for one bound source, without assuming its modality or OS. Reading does not grant control; each source rejects unsupported capabilities.
SurfaceError enum Checked failures from surface preparation, reading or session control.
SurfaceLimits struct Resource bounds for preparation, independent of any model or task.
SurfacePolicy struct Execution and retention settings for the Surface connection.
SurfaceSession struct Thread-safe session coordinating immutable evidence and one hot action owner. Live means an external capture adapter is attached, not that this object launches a browser.
SurfaceSessionPolicy struct Policy bounds shared across all cursors in one surface session.
VideoError enum Checked media preparation, scope, resource and decoder failures.
VideoPolicy struct Processing bounds. Frame size and interval granularity affect interpretation identity.
VideoSession struct Read-only video connection with its own cursor, bounded processing and archive collection. It never starts a browser or acquires action authority. Await close for finalization.
VideoSurface struct A frozen local source with a lazy timeline and read-only frame capabilities.
WebSurface struct An immutable web view implementing the same reading protocol as a video timeline.
Name Kind Summary
CancellationToken reexport —