pub struct Function<TI, TO> {
pub function: Rc<dyn Fn(&TI) -> Fallible<TO>>,
}
Expand description
Fields§
§function: Rc<dyn Fn(&TI) -> Fallible<TO>>
Implementations§
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: 'static, TO: 'static> IntoAnyFunctionExt for Function<TI, TO>
impl<TI: 'static, TO: 'static> IntoAnyFunctionExt for Function<TI, TO>
source§impl<TO: 'static> IntoAnyFunctionOutExt for Function<AnyObject, TO>
impl<TO: 'static> IntoAnyFunctionOutExt for Function<AnyObject, TO>
source§impl<DI, TX, TO, MI, MO> Shr<Function<TX, TO>> for Fallible<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 Fallible<Measurement<DI, TX, MI, MO>>where DI: 'static + Domain, TX: 'static, TO: 'static, MI: 'static + Metric, MO: 'static + Measure, (DI, MI): MetricSpace,
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
§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.source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.