field<'model, 'target>Type

PackageReified.Schema
Declares one field inside schema<'model> { }, and configures it when followed by a block.

Specification

Kind
Type
Members
41
Examples
0
``.ctor``Signature
field(getter)
``.ctor``Signature
field(name, getter)
AliasSignature
alias name
AliasSignature
alias name
AliasSignature
alias name

Summary

NameSignatureSynopsis
Operations
``.ctor``field(getter)Declares a field, deriving its camel-cased wire name from the property getter.
``.ctor``field(name, getter)No description available.
Aliasalias nameAdds one exact, input-only alternate wire name for this field.
Aliasalias nameAdds one exact, input-only alternate wire name for this field.
Aliasalias nameAdds one exact, input-only alternate wire name for this field.
Aliasalias nameAdds one exact, input-only alternate wire name for this field.
Aliasesaliases namesAdds exact, input-only alternate wire names for this field.
Aliasesaliases namesAdds exact, input-only alternate wire names for this field.
Aliasesaliases namesAdds exact, input-only alternate wire names for this field.
Aliasesaliases namesAdds exact, input-only alternate wire names for this field.
Constrainconstrain constraint'Adds a portable constraint to the field's current schema value.
Constrainconstrain constraint'Adds another portable constraint to an inferred field schema.
Constrainconstrain constraint'Adds a portable constraint to the field's current schema value.
Constraintsconstraints constraintsAdds portable constraints to the field's current schema value in declaration order.
Constraintsconstraints constraintsAdds portable constraints to the field's inferred schema in declaration order.
Constraintsconstraints constraintsAdds portable constraints to the field's inferred schema in declaration order.
DefaultValuedefaultValue valueSupplies the field value when the input omits it.
DefaultValuedefaultValue valueSupplies the field value when the input omits it.
DefaultValuedefaultValue valueSupplies the field value when the input omits it.
Describedescribe textAdds human-readable description metadata to the field's current schema.
Describedescribe textAdds human-readable description metadata to the field's schema.
Describedescribe textAdds human-readable description metadata to the field's schema.
Formatformat formatAdds format metadata to the field's current schema.
Formatformat formatAdds format metadata to the field's schema.
Formatformat formatAdds format metadata to the field's schema.
MayOmitmayOmit Allows this option-typed field's boundary input to be omitted.
MustSupplymustSupply Requires this field's boundary input to be supplied.
MustSupplymustSupply Requires this field's boundary input to be supplied.
MustSupplymustSupply Requires this field's boundary input to be supplied.
Refinerefine Refines the current raw schema with the destination type's canonical refinement.
Refinerefine refinementRefines the current raw schema with an explicit refinement.
Runthis.RunNo description available.
Runthis.RunNo description available.
Runthis.RunNo description available.
Runthis.RunNo description available.
Validatevalidate validationAdds executable validation after the pending refinement.
Validatevalidate validationAdds executable validation to the field's current schema value.
Validatevalidate validationAdds another executable validation to an inferred field schema.
Validatevalidate validationAdds executable validation to the field's current schema value.
WithSchemawithSchema schemaSupplies the schema transformed by the remaining operations in this field block.
Yieldthis.YieldNo description available.

Operations

kind:member

``.ctor``

field(getter)
Member
Declares a field, deriving its camel-cased wire name from the property getter.

Parameters

NameTypeDescription
getterExpr<('model -> 'target)>

Returns

field<'model, 'target>

Verification Examples

type Signup = { Email: string }
 field (fun (s: Signup) -> s.Email)  // wire name "email"
kind:member

``.ctor``

field(name, getter)
Member

Parameters

NameTypeDescription
namestring
getter'model -> 'target

Returns

field<'model, 'target>
kind:member

Alias

alias name
Member
Adds one exact, input-only alternate wire name for this field.

Parameters

NameTypeDescription
sourcestring

Returns

FieldRefining<'model, 'target, 'raw>
kind:member

Alias

alias name
Member
Adds one exact, input-only alternate wire name for this field.

Parameters

NameTypeDescription
sourcestring

Returns

FieldWorking<'model, 'target, 'current>
kind:member

Alias

alias name
Member
Adds one exact, input-only alternate wire name for this field.

Parameters

NameTypeDescription
sourcestring

Returns

FieldConfigured<'model, 'target>
kind:member

Alias

alias name
Member
Adds one exact, input-only alternate wire name for this field.

Parameters

NameTypeDescription
initialstring

Returns

FieldConfigured<'model, 'target>
kind:member

Aliases

aliases names
Member
Adds exact, input-only alternate wire names for this field.

Parameters

NameTypeDescription
sourcestring list

Returns

FieldRefining<'model, 'target, 'raw>
kind:member

Aliases

aliases names
Member
Adds exact, input-only alternate wire names for this field.

Parameters

NameTypeDescription
sourcestring list

Returns

FieldWorking<'model, 'target, 'current>
kind:member

Aliases

aliases names
Member
Adds exact, input-only alternate wire names for this field.

Parameters

NameTypeDescription
sourcestring list

Returns

FieldConfigured<'model, 'target>
kind:member

Aliases

aliases names
Member
Adds exact, input-only alternate wire names for this field.

Parameters

NameTypeDescription
initialstring list

Returns

FieldConfigured<'model, 'target>
kind:member

Constrain

constrain constraint'
Member
Adds a portable constraint to the field's current schema value.

Parameters

NameTypeDescription
sourceConstraint<'current>

Returns

FieldWorking<'model, 'target, 'current>
kind:member

Constrain

constrain constraint'
Member
Adds another portable constraint to an inferred field schema.

Parameters

NameTypeDescription
sourceConstraint<'target>

Returns

FieldConfigured<'model, 'target>
kind:member

Constrain

constrain constraint'
Member
Adds a portable constraint to the field's current schema value.

Parameters

NameTypeDescription
initialConstraint<'target>

Returns

FieldConfigured<'model, 'target>
kind:member

Constraints

constraints constraints
Member
Adds portable constraints to the field's current schema value in declaration order.

Parameters

NameTypeDescription
sourceConstraint<'current> list

Returns

FieldWorking<'model, 'target, 'current>
kind:member

Constraints

constraints constraints
Member
Adds portable constraints to the field's inferred schema in declaration order.

Parameters

NameTypeDescription
sourceConstraint<'target> list

Returns

FieldConfigured<'model, 'target>
kind:member

Constraints

constraints constraints
Member
Adds portable constraints to the field's inferred schema in declaration order.

Parameters

NameTypeDescription
initialConstraint<'target> list

Returns

FieldConfigured<'model, 'target>
kind:member

DefaultValue

defaultValue value
Member
Supplies the field value when the input omits it.

Parameters

NameTypeDescription
source'current

Returns

FieldWorking<'model, 'target, 'current>
kind:member

DefaultValue

defaultValue value
Member
Supplies the field value when the input omits it.

Parameters

NameTypeDescription
source'target

Returns

FieldConfigured<'model, 'target>
kind:member

DefaultValue

defaultValue value
Member
Supplies the field value when the input omits it.

Parameters

NameTypeDescription
initial'target

Returns

FieldConfigured<'model, 'target>
kind:member

Describe

describe text
Member
Adds human-readable description metadata to the field's current schema.

Parameters

NameTypeDescription
sourcestring

Returns

FieldWorking<'model, 'target, 'current>
kind:member

Describe

describe text
Member
Adds human-readable description metadata to the field's schema.

Parameters

NameTypeDescription
sourcestring

Returns

FieldConfigured<'model, 'target>
kind:member

Describe

describe text
Member
Adds human-readable description metadata to the field's schema.

Parameters

NameTypeDescription
initialstring

Returns

FieldConfigured<'model, 'target>
kind:member

Format

format format
Member
Adds format metadata to the field's current schema.

Parameters

NameTypeDescription
sourceSchemaFormat

Returns

FieldWorking<'model, 'target, 'current>
kind:member

Format

format format
Member
Adds format metadata to the field's schema.

Parameters

NameTypeDescription
sourceSchemaFormat

Returns

FieldConfigured<'model, 'target>
kind:member

Format

format format
Member
Adds format metadata to the field's schema.

Parameters

NameTypeDescription
initialSchemaFormat

Returns

FieldConfigured<'model, 'target>
kind:member

MayOmit

mayOmit
Member
Allows this option-typed field's boundary input to be omitted.

Returns

FieldWorking<'model, 'target, 'current option>

Verification Examples

open Reified.SchemaDSL
 type Signup = { Nickname: string option }
 schema<Signup> {
     field _.Nickname { mayOmit }
     construct (fun nickname -> { Nickname = nickname })
 }
kind:member

MustSupply

mustSupply
Member
Requires this field's boundary input to be supplied.

Returns

FieldWorking<'model, 'target, 'current>
kind:member

MustSupply

mustSupply
Member
Requires this field's boundary input to be supplied.

Returns

FieldConfigured<'model, 'target>
kind:member

MustSupply

mustSupply
Member
Requires this field's boundary input to be supplied.

Returns

FieldConfigured<'model, 'target>

Verification Examples

open Reified.SchemaDSL
 type Signup = { Name: string }
 schema<Signup> {
     field _.Name { mustSupply }
     construct (fun name -> { Name = name })
 }
kind:member

Refine

refine
Member
Refines the current raw schema with the destination type's canonical refinement.

Returns

FieldRefining<'model, 'target, 'raw>
kind:member

Refine

refine refinement
Member
Refines the current raw schema with an explicit refinement.

Parameters

NameTypeDescription
sourceRefinement<'raw, 'target>

Returns

FieldWorking<'model, 'target, 'target>
kind:member

Run

this.Run
Member

Parameters

NameTypeDescription
sourceFieldWorking<'model, 'target, 'current>

Returns

FieldDeclaration<'model, 'target>
kind:member

Run

this.Run
Member

Parameters

NameTypeDescription
sourceFieldRefining<'model, 'target, 'raw>

Returns

RefiningFieldDeclaration<'model, 'raw, 'target>
kind:member

Run

this.Run
Member

Parameters

NameTypeDescription
sourceFieldConfigured<'model, 'target>

Returns

ConfiguredFieldDeclaration<'model, 'target>
kind:member

Run

this.Run
Member

Parameters

NameTypeDescription
sourceFieldWorking<'model, 'target, 'target>

Returns

FieldDeclaration<'model, 'target>
kind:member

Validate

validate validation
Member
Adds executable validation after the pending refinement.

Parameters

NameTypeDescription
source'target -> Result<unit, SchemaError>

Returns

FieldRefining<'model, 'target, 'raw>
kind:member

Validate

validate validation
Member
Adds executable validation to the field's current schema value.

Parameters

NameTypeDescription
source'current -> Result<unit, SchemaError>

Returns

FieldWorking<'model, 'target, 'current>
kind:member

Validate

validate validation
Member
Adds another executable validation to an inferred field schema.

Parameters

NameTypeDescription
source'target -> Result<unit, SchemaError>

Returns

FieldConfigured<'model, 'target>
kind:member

Validate

validate validation
Member
Adds executable validation to the field's current schema value.

Parameters

NameTypeDescription
initial'target -> Result<unit, SchemaError>

Returns

FieldConfigured<'model, 'target>
kind:member

WithSchema

withSchema schema
Member
Supplies the schema transformed by the remaining operations in this field block.

Parameters

NameTypeDescription
initialSchema<'current>

Returns

FieldWorking<'model, 'target, 'current>
kind:member

Yield

this.Yield
Member

Parameters

NameTypeDescription
unit

Returns

FieldInitial<'model, 'target>