Struct mjolnir::mjolnir_lib::generators::rest::RestRequestGen
source · pub struct RestRequestGen {
rest_client: JormungandrRest,
rand: OsRng,
addresses: Vec<String>,
stake_pools: Vec<String>,
max_splits: usize,
}
Fields§
§rest_client: JormungandrRest
§rand: OsRng
§addresses: Vec<String>
§stake_pools: Vec<String>
§max_splits: usize
Implementations§
source§impl RestRequestGen
impl RestRequestGen
pub fn new(rest_client: JormungandrRest) -> Self
pub fn do_setup(&mut self, addresses: Vec<String>) -> Result<(), RestError>
pub fn next_usize(&mut self) -> usize
pub fn next_usize_in_range(&mut self, lower: usize, upper: usize) -> usize
pub fn next_address(&mut self) -> Option<&String>
pub fn next_pool_id(&mut self) -> Option<&String>
Trait Implementations§
source§impl Clone for RestRequestGen
impl Clone for RestRequestGen
source§fn clone(&self) -> RestRequestGen
fn clone(&self) -> RestRequestGen
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 RequestGenerator for RestRequestGen
impl RequestGenerator for RestRequestGen
Auto Trait Implementations§
impl !RefUnwindSafe for RestRequestGen
impl Send for RestRequestGen
impl Sync for RestRequestGen
impl Unpin for RestRequestGen
impl !UnwindSafe for RestRequestGen
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request