Post

Struct Post 

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

Nothing here reaches the heap, because while a task runs the heap is its caller rather than something it can borrow. Sends and spawns accumulate as requests the heap drains when the turn ends.

Trait Implementations§

Source§

impl Mail for Post

Source§

fn receive(&mut self) -> Option<Val>

Reaching here is what “responsive” means, whether or not there was anything to read: a task in a tight loop over a full mailbox is working rather than diverging, so blocking would be the wrong test.

Source§

fn monitor(&mut self, target: &Val) -> Result<Val, Val>

A watch goes wherever a message would, but what comes back is weaker off this heap. A dead link does not mean the far task died, only that nothing more can be learned, so it reports noconnection rather than an exit value: the caller must stop waiting either way, and must not be told a result nobody observed. A host peer that ends reports noproc and no value, an adapter having nothing it could be said to have evaluated.

Source§

fn limit(&mut self, target: &Val, turns: i64) -> Result<Val, Val>

Counted in turns rather than steps because the step budget is a fairness knob and this is not: a task on an expensive semantics gets less done per turn, but turns-to-answer is what its caller can reason about.

Source§

fn spawn(&mut self, thunk: Val) -> Result<Val, Val>

Source§

fn send(&mut self, to: &Val, msg: Val) -> Result<Val, Val>

Auto Trait Implementations§

§

impl Freeze for Post

§

impl !RefUnwindSafe for Post

§

impl Send for Post

§

impl Sync for Post

§

impl Unpin for Post

§

impl !UnwindSafe for Post

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