Skip to main content

Agents

Struct Agents 

Source
pub struct Agents { /* private fields */ }
Expand description

Agent metadata never hosts a provider, harness pipe or process.

Implementations§

Source§

impl Agents

Source

pub fn bind_console(&self, console: &Arc<ConsoleHub>) -> Result<(), AgentError>

Binds the console once; subscription resources never keep it alive.

§Errors

A console was already installed.

Source

pub fn listened_subjects( &self, connection: u64, ) -> Result<Vec<String>, AgentError>

Exact subjects of the live subscriptions, each once.

§Errors

The listen index is unavailable.

Source

pub fn track_listen( &self, connection: u64, id: u64, subject: &str, resource: Box<dyn SubscriptionResource>, ) -> Result<Box<dyn SubscriptionResource>, AgentError>

Wraps the real resource so unsubscribe, overflow and Drop remove its stop.

§Errors

A listen bound or index failure.

Source

pub fn execute_approved( &self, draft: &ApprovedDraft, ) -> Result<Execution, AgentError>

Applies an agent draft pulled and authenticated by AGT-004, then seeds the retained subjects. Replays reuse the committed mutation receipt.

§Errors

Draft, bound, store or retained-subject failure.

Source

pub fn open( store: Arc<dyn DurableStore>, bounds: AgentsConfig, network: String, supervisor: ChannelSupervisor, device: &str, placer: Option<Arc<dyn Placer>>, seats: Option<Arc<dyn AgentSeats>>, ) -> Result<Arc<Self>, AgentError>

Opens over the server’s own store and channel scheduler. Previously present tickets are durably recorded gone before admission opens.

§Errors

Invalid configuration, corrupt history, or a store or clock failure.

Source

pub const fn registry(&self) -> &Arc<AgentRegistry> ⓘ

The one registry shared with the approved-draft executor.

Source

pub const fn retained(&self) -> &Arc<Retained> ⓘ

The one retained-subject writer shared with approvals.

Source

pub const fn bounds(&self) -> &AgentsConfig

The configured positive bounds.

Source

pub fn network(&self) -> &str

The network whose placed resources decide these subjects.

Source

pub const fn presence(&self) -> &Presence

The observed presence, never inferred from a lifecycle request.

Source

pub fn created(&self, name: &str) -> Result<(), AgentError>

Seeds subjects after a draft created a station. Existing presence is preserved; a second executor notification cannot mark a live seat gone.

§Errors

Unknown station or failed retained delivery.

Source

pub fn subscribe( &self, request: AgentSubscription<'_>, ordinary: impl FnOnce(Option<InboxInstall>) -> Result<ConnectionSubscription, AgentError>, ) -> Result<ConnectionSubscription, AgentError>

Opens the real inbox or a retained metadata watcher after both identity

and subject rights are decided. The caller’s revocation and membership checks still precede this method and still run at delivery release.

§Errors

The pass, station, duplicate seat, schema or subscription is refused.

Source

pub fn close(&self, connection: u64, reason: &str) -> Result<(), AgentError>

A transport’s named close reaches the same durable observation path.

§Errors

A store, clock or delivery failure; no automatic retry is added.

Trait Implementations§

Source§

impl AgentProjection for Agents

Source§

fn apply(&self, draft: &ApprovedDraft) -> Result<(), DraftError>

Applies the native roster and state projection after durable execution. Read more
Source§

impl Debug for Agents

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Agents

§

impl !RefUnwindSafe for Agents

§

impl !UnwindSafe for Agents

§

impl Send for Agents

§

impl Sync for Agents

§

impl Unpin for Agents

§

impl UnsafeUnpin for Agents

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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