Module std::concurrency::lambda_actor

Lambda-actor handle declarations backed by native runtime FFI.

Contents

Types

Struct LambdaActorHandle

Strong handle to a runtime lambda actor.

Inherent methods

Methods

pub fn new(mailbox_capacity: i64, shape: i32) -> LambdaActorHandle

Create a lambda actor with the requested mailbox capacity and shape id.

pub fn send(handle: LambdaActorHandle, msg: bytes) -> i32

Send a fire-and-forget byte message to the actor.

pub fn ask(handle: LambdaActorHandle, msg: bytes) -> i32

Send a request byte message to the actor and await a runtime reply id.

pub fn clone(handle: LambdaActorHandle) -> LambdaActorHandle

Clone a strong lambda actor handle.

pub fn release(handle: LambdaActorHandle) -> i32

Release a strong lambda actor handle.

pub fn downgrade(handle: LambdaActorHandle) -> LambdaActorWeakHandle

Convert a strong handle into a weak lambda actor handle.

Struct LambdaActorWeakHandle

Weak handle to a runtime lambda actor.

Inherent methods

Methods

pub fn send(weak: LambdaActorWeakHandle, msg: bytes) -> i32

Try to send a byte message through a weak actor handle.

pub fn clone(weak: LambdaActorWeakHandle) -> LambdaActorWeakHandle

Clone a weak lambda actor handle.

pub fn release(weak: LambdaActorWeakHandle) -> i32

Release a weak lambda actor handle.