pub struct Function<TI, TO> {
pub function: Arc<dyn Fn(&TI) -> Fallible<TO> + Send + Sync>,
}
Expand description
Fields§
§function: Arc<dyn Fn(&TI) -> Fallible<TO> + Send + Sync>
Implementations§
source§impl<TO: 'static> Function<AnyObject, TO>
impl<TO: 'static> Function<AnyObject, TO>
pub fn into_any_out(self) -> Function<AnyObject, AnyObject>
source§impl<TI: 'static, TO: 'static> Function<TI, TO>
impl<TI: 'static, TO: 'static> Function<TI, TO>
pub fn make_chain<TX: 'static>( function1: &Function<TX, TO>, function0: &Function<TI, TX> ) -> Function<TI, TO>
Trait Implementations§
source§impl<TI, TX, TO> Shr<Function<TX, TO>> for Function<TI, TX>where
TI: 'static,
TX: 'static,
TO: 'static,
impl<TI, TX, TO> Shr<Function<TX, TO>> for Function<TI, TX>where
TI: 'static,
TX: 'static,
TO: 'static,
source§impl<DI, TX, TO, MI, MO> Shr<Function<TX, TO>> for Measurement<DI, TX, MI, MO>where
DI: 'static + Domain,
TX: 'static,
TO: 'static,
MI: 'static + Metric,
MO: 'static + Measure,
(DI, MI): MetricSpace,
impl<DI, TX, TO, MI, MO> Shr<Function<TX, TO>> for Measurement<DI, TX, MI, MO>where
DI: 'static + Domain,
TX: 'static,
TO: 'static,
MI: 'static + Metric,
MO: 'static + Measure,
(DI, MI): MetricSpace,
source§impl<DI, TX, TO, MI, MO> Shr<Function<TX, TO>> for PartialMeasurement<DI, TX, MI, MO>where
DI: 'static + Domain,
TX: 'static,
TO: 'static,
MI: 'static + Metric,
MO: 'static + Measure,
(DI, MI): MetricSpace,
impl<DI, TX, TO, MI, MO> Shr<Function<TX, TO>> for PartialMeasurement<DI, TX, MI, MO>where
DI: 'static + Domain,
TX: 'static,
TO: 'static,
MI: 'static + Metric,
MO: 'static + Measure,
(DI, MI): MetricSpace,
Auto Trait Implementations§
impl<TI, TO> !RefUnwindSafe for Function<TI, TO>
impl<TI, TO> Send for Function<TI, TO>
impl<TI, TO> Sync for Function<TI, TO>
impl<TI, TO> Unpin for Function<TI, TO>
impl<TI, TO> !UnwindSafe for Function<TI, TO>
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.