Struct another_rxrust::internals::function_wrapper::FunctionWrapper
source · pub struct FunctionWrapper<'a, In, Out>where
In: Clone + Send + Sync + 'a,
Out: Clone + Send + Sync + 'a,{ /* private fields */ }Implementations§
source§impl<'a, In, Out> FunctionWrapper<'a, In, Out>where
In: Clone + Send + Sync + 'a,
Out: Clone + Send + Sync + 'a,
impl<'a, In, Out> FunctionWrapper<'a, In, Out>where In: Clone + Send + Sync + 'a, Out: Clone + Send + Sync + 'a,
pub fn new<F>(func: F) -> FunctionWrapper<'a, In, Out>where F: Fn(In) -> Out + Send + Sync + 'a, In: Clone + Send + Sync + 'a, Out: Clone + Send + Sync + 'a,
pub fn clear(&self)
pub fn empty(&self) -> bool
pub fn exists(&self) -> bool
pub fn call(&self, indata: In) -> Out
pub fn call_if_available(&self, indata: In) -> Option<Out>
pub fn call_and_clear_if_available(&self, indata: In) -> Option<Out>
Trait Implementations§
source§impl<'a, In, Out> Clone for FunctionWrapper<'a, In, Out>where
In: Clone + Send + Sync + 'a + Clone,
Out: Clone + Send + Sync + 'a + Clone,
impl<'a, In, Out> Clone for FunctionWrapper<'a, In, Out>where In: Clone + Send + Sync + 'a + Clone, Out: Clone + Send + Sync + 'a + Clone,
source§fn clone(&self) -> FunctionWrapper<'a, In, Out>
fn clone(&self) -> FunctionWrapper<'a, In, Out>
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 more