[−][src]Struct funnybot::FunnyBot
Implementations
impl<'a, A, R> FunnyBot<'a, A, R> where
A: Send + Sync + Clone,
R: Send + Sync + 'a + Clone,
[src]
A: Send + Sync + Clone,
R: Send + Sync + 'a + Clone,
pub fn repeat(elt: R) -> Self
[src]
initialize Funnybot with a fixed value that will be repeated for each call
impl<'a, A, R> FunnyBot<'a, A, R> where
A: Send + Sync + Clone,
R: Send + Sync + 'a,
[src]
A: Send + Sync + Clone,
R: Send + Sync + 'a,
#[must_use]pub fn new(returns: Box<dyn Iterator<Item = R> + Send + Sync + 'a>) -> Self
[src]
#[must_use]pub fn from_single(returns: R) -> Self
[src]
initialize Funnybot with a single return value. consequently calling more than once will panic
#[must_use]pub fn from_list(returns: Vec<R>) -> Self
[src]
initialize Funnybot with a fixed list of return values. once the all values have returned, the function will panic
pub fn repeat_with<F: 'a + Sync + Send + FnMut() -> R>(repeater: F) -> Self
[src]
initialize Funnybot with a repeater-function that generates values for each call
pub fn call(&self, a: A) -> R
[src]
simulate a call
pass the arguments to record as a
returns the next value from the iterator as pre-programmed
pub fn into_args(self) -> Vec<A>
[src]
return the recorded arguments. This consumes the Funnybot
pub fn args(&self) -> RwLockReadGuard<Vec<A>>
[src]
return a current snapshot of the recorded arguments
Auto Trait Implementations
impl<'a, A, R> RefUnwindSafe for FunnyBot<'a, A, R>
impl<'a, A, R> Send for FunnyBot<'a, A, R>
impl<'a, A, R> Sync for FunnyBot<'a, A, R>
impl<'a, A, R> Unpin for FunnyBot<'a, A, R> where
A: Unpin,
A: Unpin,
impl<'a, A, R> UnwindSafe for FunnyBot<'a, A, R>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,