pub trait NumberGen {
    fn generate_guid<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context
    ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn random_in_range<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context,
        arg: &'life2 RangeLimit
    ) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn random_32<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context
    ) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn contract_id() -> &'static str { ... } }
Expand description

wasmbus.contractId: wasmcloud:builtin:numbergen wasmbus.providerReceive

Required methods

GenerateGuid - return a 128-bit guid in the form 123e4567-e89b-12d3-a456-426655440000 These guids are known as “version 4”, meaning all bits are random or pseudo-random.

Request a random integer within a range The result will will be in the range [min,max), i.e., >= min and < max.

Request a 32-bit random number

Provided methods

returns the capability contract id for this interface

Implementors