[][src]Struct wascc_actor::CapabilitiesContext

pub struct CapabilitiesContext { /* fields omitted */ }

The capabilities context is the gateway through which all actors communicate with a host runtime. A reference to a capabilities context is passed to the receive function defined by the actor. Individual capabilities are separated through function calls for each capability provider, including any bound opaque raw providers.

Methods

impl CapabilitiesContext[src]

pub fn new() -> CapabilitiesContext[src]

Creates a new capabilities context. This is invoked by the actor_receive macro

pub fn custom(
    kv: impl KeyValueStore + 'static,
    msg: impl MessageBroker + 'static,
    raw: impl RawCapability + 'static,
    blob: impl ObjectStore + 'static,
    extras: impl Extras + 'static,
    events: impl EventStreams + 'static,
    log: impl Logger + 'static
) -> Self
[src]

Creates a custom capabilities context. This should be invoked by unit tests looking to test a receive function with mock capabilities

pub fn kv(&self) -> &dyn KeyValueStore[src]

pub fn msg(&self) -> &dyn MessageBroker[src]

pub fn raw(&self) -> &dyn RawCapability[src]

pub fn objectstore(&self) -> &dyn ObjectStore[src]

pub fn extras(&self) -> &dyn Extras[src]

pub fn events(&self) -> &dyn EventStreams[src]

pub fn log(&self) -> &dyn Logger[src]

pub fn println(&self, msg: &str)[src]

Trait Implementations

impl Default for CapabilitiesContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.