pub trait NumberGen {
// Required methods
fn generate_guid<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: '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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn contract_id() -> &'static str { ... }
}Expand description
wasmbus.contractId: wasmcloud:builtin:numbergen wasmbus.providerReceive
Required Methods§
Sourcefn generate_guid<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_guid<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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.
Sourcefn 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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Request a random integer within a range The result will will be in the range [min,max), i.e., >= min and < max.
Provided Methods§
Sourcefn contract_id() -> &'static str
fn contract_id() -> &'static str
returns the capability contract id for this interface
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.