Skip to main content

RootOnly

Struct RootOnly 

Source
pub struct RootOnly {
    pub now: Clock,
}
Expand description

A host with only the root lane and no task runtime: every task operation that needs one is refused.

Fields§

§now: Clock

Trait Implementations§

Source§

impl TaskHost for RootOnly

Source§

fn caller_task_id(&self, _lane: &str) -> Option<String>

Task that owns lane, or None for the root lane.
Source§

fn task_lane(&self, _task_id: &str) -> Option<String>

Lane a live task ran on, if any.
Source§

fn strategy(&self, definition: &str) -> Result<String, String>

Execution strategy of a registered definition (“deterministic” | “predict” | “rlm”).
Source§

fn tasks(&self) -> Result<Vec<Value>, String>

Every task of the session (NativeTask objects: id, parentId, definition, state, …).
Source§

fn spawn( &self, _request: &Value, _parent: Option<&str>, ) -> Result<Value, String>

Admits request ({definition, input, model?, key?, timeoutMs?, lane?}) as a child of parent.
Source§

fn result(&self, _task_id: &str) -> Result<Value, String>

Blocks until the task’s durable terminal result (NativeResult).
Source§

fn cancel(&self, _task_id: &str, _reason: &str) -> Result<Value, String>

Source§

fn steer(&self, _task_id: &str, _message: &str) -> Result<bool, String>

Queues a steering message into a running task’s lane; false when it has no live lane.
Source§

fn now(&self) -> i64

Source§

fn usage(&self) -> Result<Option<Value>, String>

Usage status of the caller’s root.
Source§

fn pin_lane(&self, _lane: &str, _holder: &str) -> bool

Keeps a lane’s Python kernel alive for holder; false when the host has no pool or no pin capacity left.
Source§

fn unpin_lane(&self, _lane: &str, _holder: &str)

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> 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. 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<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