pub struct NumberGenSender<T: Transport> { /* private fields */ }Expand description
NumberGenSender sends messages to a NumberGen service client for sending NumberGen messages
Implementations§
Source§impl<T: Transport> NumberGenSender<T>
impl<T: Transport> NumberGenSender<T>
pub fn set_timeout(&self, interval: Duration)
Trait Implementations§
Source§impl<T: Clone + Transport> Clone for NumberGenSender<T>
impl<T: Clone + Transport> Clone for NumberGenSender<T>
Source§fn clone(&self) -> NumberGenSender<T>
fn clone(&self) -> NumberGenSender<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Transport + Sync + Send> NumberGen for NumberGenSender<T>
impl<T: Transport + Sync + Send> NumberGen for NumberGenSender<T>
Source§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 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.
Source§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_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.
Source§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,
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,
Request a 32-bit random number
Source§fn contract_id() -> &'static str
fn contract_id() -> &'static str
returns the capability contract id for this interface
Auto Trait Implementations§
impl<T> Freeze for NumberGenSender<T>where
T: Freeze,
impl<T> RefUnwindSafe for NumberGenSender<T>where
T: RefUnwindSafe,
impl<T> Send for NumberGenSender<T>
impl<T> Sync for NumberGenSender<T>
impl<T> Unpin for NumberGenSender<T>where
T: Unpin,
impl<T> UnwindSafe for NumberGenSender<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more