Skip to main content

Flow

Struct Flow 

Source
pub struct Flow {
    pub id: FlowId,
    pub vm: Vm,
    pub mailbox: Arc<Mailbox>,
    pub metrics: Arc<FlowMetrics>,
    pub restart_policy: RestartPolicy,
    pub pending_message: Option<Value>,
    pub last_receive_dest: Option<u8>,
    /* private fields */
}
Expand description

A single flow: VM state, mailbox, and bookkeeping.

This is the unit of work moved by the scheduler — pushed onto worker deques, stolen, parked inside a Mailbox on Receive, or held by the timer wheel while sleeping. Flows talk only via Atomic Hops (crate::Value::Message on Send).

Fields§

§id: FlowId§vm: Vm§mailbox: Arc<Mailbox>§metrics: Arc<FlowMetrics>§restart_policy: RestartPolicy§pending_message: Option<Value>

Set by Mailbox::park when a hop wins the park race.

§last_receive_dest: Option<u8>

Destination register of the most recent Receive / ReceiveTimeout / selective receive (ReceiveMatch*).

Implementations§

Source§

impl Flow

Source

pub fn new( id: FlowId, vm: Vm, mailbox: Arc<Mailbox>, restart_policy: RestartPolicy, completion: Sender<FlowOutcome>, ) -> Self

Auto Trait Implementations§

§

impl !RefUnwindSafe for Flow

§

impl !UnwindSafe for Flow

§

impl Forget for Flow

§

impl Freeze for Flow
where *const ArcInner<Chunk> is !null: Freeze, PhantomData<ArcInner<Chunk>>: Freeze, *const ArcInner<NativeTable> is !null: Freeze, PhantomData<ArcInner<NativeTable>>: Freeze, *const ArcInner<[u64]> is !null: Freeze, PhantomData<ArcInner<[u64]>>: Freeze, *const ArcInner<RevocationCell> is !null: Freeze, PhantomData<ArcInner<RevocationCell>>: Freeze, *const u8 is !null: Freeze, PhantomData<Frame>: Freeze, *const ArcInner<FlowQuota> is !null: Freeze, PhantomData<ArcInner<FlowQuota>>: Freeze, *const ArcInner<MemoryBudget> is !null: Freeze, PhantomData<ArcInner<MemoryBudget>>: Freeze, PhantomData<(i64, Value)>: Freeze, *const ArcInner<Mailbox> is !null: Freeze, PhantomData<ArcInner<Mailbox>>: Freeze, *const ArcInner<FlowMetrics> is !null: Freeze, PhantomData<ArcInner<FlowMetrics>>: Freeze, *const ArcInner<Inner<FlowOutcome>> is !null: Freeze, PhantomData<ArcInner<Inner<FlowOutcome>>>: Freeze, *const ArcInner<Value> is !null: Freeze, PhantomData<ArcInner<Value>>: Freeze, *const ArcInner<str> is !null: Freeze, PhantomData<ArcInner<str>>: Freeze, *const ArcInner<[u8]> is !null: Freeze, PhantomData<ArcInner<[u8]>>: Freeze, *const ArcInner<[Value]> is !null: Freeze, PhantomData<ArcInner<[Value]>>: Freeze, *const ArcInner<[(MapKey, Value)]> is !null: Freeze, PhantomData<ArcInner<[(MapKey, Value)]>>: Freeze, *const ArcInner<Inner> is !null: Freeze, PhantomData<ArcInner<Inner>>: Freeze,

§

impl Move for Flow

§

impl Send for Flow

§

impl Sync for Flow

§

impl Unpin for Flow

§

impl UnsafeUnpin for Flow
where *const ArcInner<Chunk> is !null: UnsafeUnpin, PhantomData<ArcInner<Chunk>>: UnsafeUnpin, *const ArcInner<NativeTable> is !null: UnsafeUnpin, PhantomData<ArcInner<NativeTable>>: UnsafeUnpin, *const ArcInner<[u64]> is !null: UnsafeUnpin, PhantomData<ArcInner<[u64]>>: UnsafeUnpin, *const ArcInner<RevocationCell> is !null: UnsafeUnpin, PhantomData<ArcInner<RevocationCell>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<Frame>: UnsafeUnpin, *const ArcInner<FlowQuota> is !null: UnsafeUnpin, PhantomData<ArcInner<FlowQuota>>: UnsafeUnpin, *const ArcInner<MemoryBudget> is !null: UnsafeUnpin, PhantomData<ArcInner<MemoryBudget>>: UnsafeUnpin, PhantomData<(i64, Value)>: UnsafeUnpin, *const ArcInner<Mailbox> is !null: UnsafeUnpin, PhantomData<ArcInner<Mailbox>>: UnsafeUnpin, *const ArcInner<FlowMetrics> is !null: UnsafeUnpin, PhantomData<ArcInner<FlowMetrics>>: UnsafeUnpin, *const ArcInner<Inner<FlowOutcome>> is !null: UnsafeUnpin, PhantomData<ArcInner<Inner<FlowOutcome>>>: UnsafeUnpin, *const ArcInner<Value> is !null: UnsafeUnpin, PhantomData<ArcInner<Value>>: UnsafeUnpin, *const ArcInner<str> is !null: UnsafeUnpin, PhantomData<ArcInner<str>>: UnsafeUnpin, *const ArcInner<[u8]> is !null: UnsafeUnpin, PhantomData<ArcInner<[u8]>>: UnsafeUnpin, *const ArcInner<[Value]> is !null: UnsafeUnpin, PhantomData<ArcInner<[Value]>>: UnsafeUnpin, *const ArcInner<[(MapKey, Value)]> is !null: UnsafeUnpin, PhantomData<ArcInner<[(MapKey, Value)]>>: UnsafeUnpin, *const ArcInner<Inner> is !null: UnsafeUnpin, PhantomData<ArcInner<Inner>>: UnsafeUnpin,

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, 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