Struct opendp::core::partials::PartialTransformation
source · pub struct PartialTransformation<DI: Domain, DO: Domain, MI: Metric, MO: Metric>(Box<dyn FnOnce(DI, MI) -> Fallible<Transformation<DI, DO, MI, MO>>>);
Tuple Fields§
§0: Box<dyn FnOnce(DI, MI) -> Fallible<Transformation<DI, DO, MI, MO>>>
Implementations§
source§impl<DI: 'static + Domain, DO: 'static + Domain, MI: 'static + Metric, MO: 'static + Metric> PartialTransformation<DI, DO, MI, MO>where
DI::Carrier: 'static,
DO::Carrier: 'static,
MI::Distance: 'static,
MO::Distance: 'static,
(DI, MI): MetricSpace,
(DO, MO): MetricSpace,
impl<DI: 'static + Domain, DO: 'static + Domain, MI: 'static + Metric, MO: 'static + Metric> PartialTransformation<DI, DO, MI, MO>where
DI::Carrier: 'static,
DO::Carrier: 'static,
MI::Distance: 'static,
MO::Distance: 'static,
(DI, MI): MetricSpace,
(DO, MO): MetricSpace,
source§impl<DI: Domain, DO: Domain, MI: Metric, MO: Metric> PartialTransformation<DI, DO, MI, MO>
impl<DI: Domain, DO: Domain, MI: Metric, MO: Metric> PartialTransformation<DI, DO, MI, MO>
pub fn new( partial: impl FnOnce(DI, MI) -> Fallible<Transformation<DI, DO, MI, MO>> + 'static ) -> Self
pub fn fix( self, input_domain: DI, input_metric: MI ) -> Fallible<Transformation<DI, DO, MI, MO>>
Trait Implementations§
source§impl<DI, DX, TO, MI, MX, MO> Shr<Measurement<DX, TO, MX, MO>> for PartialTransformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
TO: 'static,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Measure,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
impl<DI, DX, TO, MI, MX, MO> Shr<Measurement<DX, TO, MX, MO>> for PartialTransformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
TO: 'static,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Measure,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
§type Output = PartialMeasurement<DI, TO, MI, MO>
type Output = PartialMeasurement<DI, TO, MI, MO>
The resulting type after applying the
>>
operator.source§impl<DI, DX, TO, MI, MX, MO> Shr<PartialMeasurement<DX, TO, MX, MO>> for PartialTransformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
TO: 'static,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Measure,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
impl<DI, DX, TO, MI, MX, MO> Shr<PartialMeasurement<DX, TO, MX, MO>> for PartialTransformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
TO: 'static,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Measure,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
§type Output = PartialMeasurement<DI, TO, MI, MO>
type Output = PartialMeasurement<DI, TO, MI, MO>
The resulting type after applying the
>>
operator.source§impl<DI, DO, MI, MO> Shr<PartialTransformation<DI, DO, MI, MO>> for (DI, MI)where
DI: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DO, MO): MetricSpace,
impl<DI, DO, MI, MO> Shr<PartialTransformation<DI, DO, MI, MO>> for (DI, MI)where
DI: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DO, MO): MetricSpace,
source§impl<DI, DX, DO, MI, MX, MO> Shr<PartialTransformation<DX, DO, MX, MO>> for PartialTransformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
(DO, MO): MetricSpace,
impl<DI, DX, DO, MI, MX, MO> Shr<PartialTransformation<DX, DO, MX, MO>> for PartialTransformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
(DO, MO): MetricSpace,
§type Output = PartialTransformation<DI, DO, MI, MO>
type Output = PartialTransformation<DI, DO, MI, MO>
The resulting type after applying the
>>
operator.source§impl<DI, DX, DO, MI, MX, MO> Shr<PartialTransformation<DX, DO, MX, MO>> for Fallible<Transformation<DI, DX, MI, MX>>where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
(DO, MO): MetricSpace,
impl<DI, DX, DO, MI, MX, MO> Shr<PartialTransformation<DX, DO, MX, MO>> for Fallible<Transformation<DI, DX, MI, MX>>where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
(DO, MO): MetricSpace,
source§impl<DI, DX, DO, MI, MX, MO> Shr<PartialTransformation<DX, DO, MX, MO>> for Transformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
(DO, MO): MetricSpace,
impl<DI, DX, DO, MI, MX, MO> Shr<PartialTransformation<DX, DO, MX, MO>> for Transformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
(DO, MO): MetricSpace,
source§impl<DI, DX, DO, MI, MX, MO> Shr<Transformation<DX, DO, MX, MO>> for PartialTransformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
(DO, MO): MetricSpace,
impl<DI, DX, DO, MI, MX, MO> Shr<Transformation<DX, DO, MX, MO>> for PartialTransformation<DI, DX, MI, MX>where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Metric,
(DI, MI): MetricSpace,
(DX, MX): MetricSpace,
(DO, MO): MetricSpace,
§type Output = PartialTransformation<DI, DO, MI, MO>
type Output = PartialTransformation<DI, DO, MI, MO>
The resulting type after applying the
>>
operator.Auto Trait Implementations§
impl<DI, DO, MI, MO> !RefUnwindSafe for PartialTransformation<DI, DO, MI, MO>
impl<DI, DO, MI, MO> !Send for PartialTransformation<DI, DO, MI, MO>
impl<DI, DO, MI, MO> !Sync for PartialTransformation<DI, DO, MI, MO>
impl<DI, DO, MI, MO> Unpin for PartialTransformation<DI, DO, MI, MO>
impl<DI, DO, MI, MO> !UnwindSafe for PartialTransformation<DI, DO, MI, MO>
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.