[][src]Struct wascc_host::HostBuilder

pub struct HostBuilder { /* fields omitted */ }

A builder pattern implementation for creating a custom-configured host runtime

Implementations

impl HostBuilder[src]

pub fn new() -> HostBuilder[src]

Creates a new host builder. This builder will initialize itself with some defaults obtained from the environment. The labels list will pre-populate with the hostcore.* labels, the namespace will be gleaned from the LATTICE_NAMESPACE environment variable (if lattice mode is enabled), and the default authorizer will be set.

pub fn with_lattice_namespace(self, ns: &str) -> HostBuilder[src]

Sets the lattice namespace for this host. A lattice namespace is a unit of multi-tenant isolation on a network. To reduce the risk of conflicts or subscription failures, the lattice namespace should not include any non-alphanumeric characters.

pub fn with_authorizer(
    self,
    authorizer: impl Authorizer + 'static
) -> HostBuilder
[src]

Sets a custom authorizer to be used for authorizing actors, capability providers, and invocation requests. Note that the authorizer cannot be used to implement less strict measures than the default authorizer, it can only be used to implement more strict rules

pub fn with_label(self, key: &str, value: &str) -> HostBuilder[src]

Adds an arbitrary label->value pair of metadata to the host. Cannot override reserved labels such as those that begin with hostcore. Calling this twice on the same label will have no effect after the first call.

pub fn build(self) -> Host[src]

Converts the transient builder instance into a realized host runtime instance

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> Instrument for T[src]

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

impl<T> Pointee for T

type Pointer = u32

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

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