LensModule

PackageFCQRS.Model

Summary

NameSignatureSynopsis
ofIsomorphismLens.ofIsomorphism (f, t)Converts an isomorphism into a lens.
toValidatedLens.toValidated (lens, lens)Lift a standard Lens into a ValidatedLens with no validation.
toAsyncValidatedLens.toAsyncValidated (lens, lens)Lift a ValidatedLens into an AsyncValidatedLens with no asynchronous work.

ofIsomorphism

Lens.ofIsomorphism (f, t)
Member
Converts an isomorphism into a lens.

Parameters

NameTypeDescription
f'a -> 'b
t'b -> 'a

Returns

Lens<'a, 'b>

toValidated

Lens.toValidated (lens, lens)
Member
Lift a standard Lens into a ValidatedLens with no validation.

Parameters

NameTypeDescription
lens'a -> 'b
lens'b -> 'a -> 'a

Returns

ValidatedLens<'a, 'b, 'e>

toAsyncValidated

Lens.toAsyncValidated (lens, lens)
Member
Lift a ValidatedLens into an AsyncValidatedLens with no asynchronous work.

Parameters

NameTypeDescription
lens'a -> 'b
lens'b -> 'a -> Result<'a, 'e>

Returns

AsyncValidatedLens<'a, 'b, 'e>