pub struct FunctionWrapper<'a, In, Out>{ /* private fields */ }
Implementations§
Source§impl<'a, In, Out> FunctionWrapper<'a, In, Out>
impl<'a, In, Out> FunctionWrapper<'a, In, Out>
pub fn new<F>(func: F) -> FunctionWrapper<'a, In, Out>
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>
impl<'a, In, Out> Clone for FunctionWrapper<'a, In, Out>
Source§fn clone(&self) -> FunctionWrapper<'a, In, Out>
fn clone(&self) -> FunctionWrapper<'a, In, Out>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<'a, In, Out> Freeze for FunctionWrapper<'a, In, Out>
impl<'a, In, Out> RefUnwindSafe for FunctionWrapper<'a, In, Out>
impl<'a, In, Out> Send for FunctionWrapper<'a, In, Out>
impl<'a, In, Out> Sync for FunctionWrapper<'a, In, Out>
impl<'a, In, Out> Unpin for FunctionWrapper<'a, In, Out>
impl<'a, In, Out> UnwindSafe for FunctionWrapper<'a, In, Out>
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