Skip to main content

VastarRuntimeWorld

Struct VastarRuntimeWorld 

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

Main VIL runtime facade.

Implementations§

Source§

impl VastarRuntimeWorld

Source

pub fn new() -> VastarRuntimeWorld

Create runtime in LOCAL mode (in-memory, single process).

Source

pub fn new_shared() -> Result<VastarRuntimeWorld, Error>

Create or attach to runtime in SHARED mode (cross-process).

Source

pub fn new_shared_with_host( host_id: HostId, ) -> Result<VastarRuntimeWorld, Error>

Create or attach to runtime in SHARED mode with a specific HostId.

Source

pub fn register_process( &self, spec: ProcessSpec, ) -> Result<ProcessHandle, RtError>

Source

pub fn connect(&self, from: PortId, to: PortId)

Source

pub fn reroute(&self, from: PortId, to_list: Vec<PortId>)

REROUTE: Atomically change the targets for a port.

Source

pub fn inject_descriptor( &self, target_port: PortId, descriptor: Descriptor, ) -> Result<(), RtError>

MANUALLY INJECT a descriptor into a port queue. Used for simulation of network arrival.

Source

pub fn simulate_pull_completion<T>(&self, sample_id: SampleId, value: T)
where T: MessageContract + Send + Sync + 'static,

Simulated RDMA Pull completion. Manually populates the local store for a remote sample ID.

Source

pub fn loan_uninit<T>(&self, origin_port: PortId) -> Result<Loaned<T>, RtError>

Source

pub fn publish_value<T>( &self, owner: ProcessId, origin_port: PortId, value: T, ) -> Result<Published<T>, RtError>
where T: MessageContract + Send + Sync + 'static,

publish_value: Ergonomic helper to avoid manual loan/write/publish boilerplate.

Source

pub fn publish_control_done( &self, owner: ProcessId, origin_port: PortId, session_id: u64, ) -> Result<Published<GenericToken>, RtError>

publish_control_done: Emissions of Control plane markers.

Source

pub fn shm_registry(&self) -> Option<ShmRegistry>

Source

pub fn exchange_heap(&self) -> Option<&ExchangeHeap>

Get access to the ExchangeHeap for direct SHM writes (ShmToken path).

Source

pub fn data_region_id(&self) -> Option<RegionId>

Get the data region ID for SHM payload writes.

Source

pub fn verbs_driver(&self) -> Option<Arc<dyn VerbsDriver>>

Source

pub fn raw_counters(&self) -> &RuntimeCounters

Source

pub fn publish<T>( &self, owner: ProcessId, origin_port: PortId, loan: Loaned<T>, ) -> Result<Published<T>, RtError>
where T: MessageContract + Send + Sync + 'static,

Source

pub fn publish_control( &self, origin_process: ProcessId, origin_port: PortId, signal: ControlSignal, ) -> Result<Published<ControlSignal>, RtError>

Source

pub fn recv<T>(&self, target_port: PortId) -> Result<SampleGuard<T>, RtError>
where T: MessageContract + Send + Sync + 'static,

Source

pub fn release_sample(&self, sample_id: SampleId)

Source

pub fn metrics_snapshot(&self) -> RuntimeMetrics

Source

pub fn supervisor(&self) -> Supervisor

Source

pub fn crash_process(&self, process_id: ProcessId) -> CleanupReport

Source

pub fn obs(&self) -> &ObservabilityHub

Source

pub fn registry_processes(&self) -> Vec<ProcessSnapshot>

Snapshot of all processes in the registry.

Source

pub fn registry_ports(&self) -> Vec<PortSnapshot>

Snapshot of all ports in the registry.

Source

pub fn registry_samples(&self) -> Vec<SampleSnapshot>

Snapshot of all samples in the registry.

Source

pub fn shm_stats(&self) -> Vec<RegionStats>

Shared memory region usage statistics.

Source

pub fn compact_shm(&self) -> Result<usize, String>

Triggers compacting specifically for SHARED mode data regions.

Source

pub fn counters_snapshot(&self) -> CounterSnapshot

Snapshot of all performance counters.

Source

pub fn inc_publish(&self)

Increment manual counter “publish”.

Source

pub fn inc_receive(&self)

Increment manual counter “receive”.

Source

pub fn record_latency(&self, latency_ns: u64)

Record manual latency sample.

Source

pub fn latency_snapshot(&self) -> LatencySnapshot

Snapshot of latency from the global tracker.

Source

pub fn register_host(&self, host_id: HostId, addr: &str) -> bool

Register a remote host in the registry.

Source

pub fn heartbeat(&self)

Send heartbeat for the local host.

Source

pub fn perform_health_check(&self, timeout_ns: u64)

Run health check and detect failover.

Source

pub fn sync_world_state( &self, processes: &[ProcessSnapshot], ports: &[PortSnapshot], hosts: &[(HostId, String)], )

Synchronize registry state from a remote snapshot.

Source

pub fn recv_control( &self, target_port: PortId, ) -> Result<ControlSignal, RtError>

Trait Implementations§

Source§

impl Clone for VastarRuntimeWorld

Source§

fn clone(&self) -> VastarRuntimeWorld

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for VastarRuntimeWorld

Source§

fn default() -> VastarRuntimeWorld

Returns the “default value” for a type. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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: 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: 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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