Skip to main content

Request

Enum Request 

Source
pub enum Request {
    CancellationSupported,
    Cancellable {
        id: u64,
        request: Box<Request>,
    },
    Cancel {
        id: u64,
    },
    Complete {
        profile_id: String,
        model_id: String,
        request: ModelRequest,
        timeout_ms: u64,
        stream: bool,
    },
    CompleteDefault {
        request: ModelRequest,
        timeout_ms: u64,
        stream: bool,
    },
    Trace {
        trace: PlanTrace,
        event: TraceEvent,
        at_unix_ms: Option<u64>,
    },
    AnalyzeImage {
        profile_id: String,
        model_id: String,
        image: VisionImage,
    },
    ClusterFaces {
        profile_id: String,
        model_id: String,
        images: Vec<FaceImage>,
    },
    SegmentSubject {
        image: VisionImage,
    },
    ListModels {
        profile_id: String,
    },
}
Expand description

A request that can cross the sandbox boundary. A server also authenticates the launcher-provided app preamble. No request carries a provider key: this computer keeps none.

Variants§

§

CancellationSupported

Negotiate reusable, per-operation cancellation before starting work. Older gateways reject this verb; clients must not start paid work then.

§

Cancellable

Native connection-local operation identity. Not an authentication claim.

Fields

§id: u64
§request: Box<Request>
§

Cancel

Cancel only the matching operation on this authenticated connection. The acknowledgement is a synchronization barrier, even after completion.

Fields

§id: u64
§

Complete

Provider-neutral completion, asked of the person’s own model on their workspace’s server. The provider and model it names are this computer’s description of the caller’s choice; the server answers with the model the person chose there.

Fields

§profile_id: String
§model_id: String
§timeout_ms: u64
§stream: bool
§

CompleteDefault

Provider-neutral completion with the person’s default model, asked on their workspace’s server.

Fields

§timeout_ms: u64
§stream: bool
§

Trace

A content-free timing mark from the agent (whose own stderr a managed launch discards), written to the gateway’s timing log. Older RPC3 servers reject this additive verb; callers ignore the refusal.

Fields

§at_unix_ms: Option<u64>

When the mark happened (Unix ms), if the caller had to hold it while a streamed turn owned the channel. Absent: now.

§

AnalyzeImage

Fixed-shape, device-local visual analysis for Photos. The gateway owns the prompt and refuses hosted, unpinned, or non-vision profiles; a sandboxed caller never obtains direct network access.

Fields

§profile_id: String
§model_id: String
§

ClusterFaces

Fixed, consent-guarded face detection and clustering. The gateway owns the request schema and admits it only for the signed local face model. It returns opaque cluster/photo membership; no embedding, crop, face rectangle, identity name, or raw path can cross this boundary.

Fields

§profile_id: String
§model_id: String
§images: Vec<FaceImage>
§

SegmentSubject

Find the subject of one bounded picture with the on-device segmentation model the person installed (Settings › Models). The gateway runs the model itself, on the CPU; no model file, path or network reaches the caller, and nothing leaves the device. Answers a SubjectMatte as JSON. Older servers reject this verb; callers treat that as no model.

Fields

§

ListModels

The models a provider offers, asked with its stored key or sign-in: Settings’ model list and connection test. Answers the models as JSON (ModelDescriptors); a failure names its kind, never what the provider wrote. Older gateways reject this verb.

Fields

§profile_id: String

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for Request

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Request

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more