Enum ProcState

Source
pub enum ProcState {
    Created {
        proc_id: ProcId,
        point: Point,
        pid: u32,
    },
    Running {
        proc_id: ProcId,
        mesh_agent: ActorRef<MeshAgent>,
        addr: ChannelAddr,
    },
    Stopped {
        proc_id: ProcId,
        reason: ProcStopReason,
    },
    Failed {
        world_id: WorldId,
        description: String,
    },
}
Expand description

A proc’s status. A proc can only monotonically move from Created to Running to Stopped.

Variants§

§

Created

A proc was added to the alloc.

Fields

§proc_id: ProcId

The proc’s id.

§point: Point

Its assigned point (in the alloc’s extent).

§pid: u32

The system process ID of the created child process.

§

Running

A proc was started.

Fields

§proc_id: ProcId
§mesh_agent: ActorRef<MeshAgent>

Reference to this proc’s mesh agent. In the future, we’ll reserve a ‘well known’ PID (0) for this purpose.

§addr: ChannelAddr

The address of this proc. The endpoint of this address is the proc’s mailbox, which accepts hyperactor::mailbox::MessageEnvelopes.

§

Stopped

A proc was stopped.

Fields

§proc_id: ProcId
§

Failed

Allocation process encountered an irrecoverable error. Depending on the implementation, the allocation process may continue transiently and calls to next() may return some events. But eventually the allocation will not be complete. Callers can use the description to determine the reason for the failure. Allocation can then be cleaned up by calling stop()`` on the Alloc` and drain the iterator for clean shutdown.

Fields

§world_id: WorldId

The world ID of the failed alloc.

§description: String

A description of the failure.

Implementations§

Source§

impl ProcState

Source

pub fn is_created(&self) -> bool

Returns true if this is a ProcState::Created, otherwise false

Source

pub fn as_created_mut(&mut self) -> Option<(&mut ProcId, &mut Point, &mut u32)>

Optionally returns mutable references to the inner fields if this is a ProcState::Created, otherwise None

Source

pub fn as_created(&self) -> Option<(&ProcId, &Point, &u32)>

Optionally returns references to the inner fields if this is a ProcState::Created, otherwise None

Source

pub fn into_created(self) -> Result<(ProcId, Point, u32), Self>

Returns the inner fields if this is a ProcState::Created, otherwise returns back the enum in the Err case of the result

Source

pub fn is_running(&self) -> bool

Returns true if this is a ProcState::Running, otherwise false

Source

pub fn as_running_mut( &mut self, ) -> Option<(&mut ProcId, &mut ActorRef<MeshAgent>, &mut ChannelAddr)>

Optionally returns mutable references to the inner fields if this is a ProcState::Running, otherwise None

Source

pub fn as_running( &self, ) -> Option<(&ProcId, &ActorRef<MeshAgent>, &ChannelAddr)>

Optionally returns references to the inner fields if this is a ProcState::Running, otherwise None

Source

pub fn into_running( self, ) -> Result<(ProcId, ActorRef<MeshAgent>, ChannelAddr), Self>

Returns the inner fields if this is a ProcState::Running, otherwise returns back the enum in the Err case of the result

Source

pub fn is_stopped(&self) -> bool

Returns true if this is a ProcState::Stopped, otherwise false

Source

pub fn as_stopped_mut(&mut self) -> Option<(&mut ProcId, &mut ProcStopReason)>

Optionally returns mutable references to the inner fields if this is a ProcState::Stopped, otherwise None

Source

pub fn as_stopped(&self) -> Option<(&ProcId, &ProcStopReason)>

Optionally returns references to the inner fields if this is a ProcState::Stopped, otherwise None

Source

pub fn into_stopped(self) -> Result<(ProcId, ProcStopReason), Self>

Returns the inner fields if this is a ProcState::Stopped, otherwise returns back the enum in the Err case of the result

Source

pub fn is_failed(&self) -> bool

Returns true if this is a ProcState::Failed, otherwise false

Source

pub fn as_failed_mut(&mut self) -> Option<(&mut WorldId, &mut String)>

Optionally returns mutable references to the inner fields if this is a ProcState::Failed, otherwise None

Source

pub fn as_failed(&self) -> Option<(&WorldId, &String)>

Optionally returns references to the inner fields if this is a ProcState::Failed, otherwise None

Source

pub fn into_failed(self) -> Result<(WorldId, String), Self>

Returns the inner fields if this is a ProcState::Failed, otherwise returns back the enum in the Err case of the result

Trait Implementations§

Source§

impl Clone for ProcState

Source§

fn clone(&self) -> ProcState

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 Debug for ProcState

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ProcState

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 Display for ProcState

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ProcState

Source§

fn eq(&self, other: &ProcState) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ProcState

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

impl StructuralPartialEq for ProcState

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
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

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.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<A, M> Handler<IndexedErasedUnbound<M>> for A
where A: Handler<M>, M: Castable,

Source§

fn handle<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, A>, msg: IndexedErasedUnbound<M>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, A: 'async_trait,

Handle the next M-typed message.
§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<M> Message for M
where M: Debug + Send + Sync + 'static,