Documentation ¶
Index ¶
- Constants
- Variables
- func All[T any](handler miruken.Handler, source any, constraints ...any) (t []T, _ *promise.Promise[[]T], _ error)
- type Builder
- type Direction
- type Format
- func (f *Format) Direction() Direction
- func (f *Format) FlipDirection() *Format
- func (f *Format) Implied() bool
- func (f *Format) InitWithTag(tag reflect.StructTag) error
- func (f *Format) Merge(constraint miruken.Constraint) bool
- func (f *Format) Name() string
- func (f *Format) Params() map[string]string
- func (f *Format) Required() bool
- func (f *Format) Rule() FormatRule
- func (f *Format) Satisfies(required miruken.Constraint, ctx miruken.HandleContext) bool
- type FormatRule
- type It
- func Into[T any](handler miruken.Handler, source any, target *T, constraints ...any) (p *promise.Promise[any], m *It, err error)
- func Key[T any](handler miruken.Handler, key any, constraints ...any) (t T, tp *promise.Promise[T], m *It, err error)
- func Out[T any](handler miruken.Handler, source any, constraints ...any) (t T, tp *promise.Promise[T], m *It, err error)
- type Strict
Constants ¶
View Source
const ( DirectionNone Direction = 0 DirectionTo Direction = 1 << iota DirectionFrom FormatRuleEquals FormatRule = 0 FormatRuleStartsWith FormatRule = 1 << iota FormatRuleEndsWith FormatRulePattern FormatRuleAll )
Variables ¶
View Source
var ( ErrInvalidFormat = errors.New("invalid format tag") ErrEmptyFormatIdentifier = errors.New("empty format name") )
Functions ¶
Types ¶
type Builder ¶ added in v0.22.0
type Builder struct { miruken.CallbackBuilder // contains filtered or unexported fields }
Builder builds It callbacks.
func (*Builder) FromSource ¶ added in v0.22.0
type Format ¶ added in v0.22.0
type Format struct {
// contains filtered or unexported fields
}
Format is a Constraint for applying formatting.
func (*Format) FlipDirection ¶ added in v0.25.0
func (*Format) InitWithTag ¶ added in v0.22.0
func (*Format) Rule ¶ added in v0.22.0
func (f *Format) Rule() FormatRule
func (*Format) Satisfies ¶ added in v0.22.0
func (f *Format) Satisfies(required miruken.Constraint, ctx miruken.HandleContext) bool
type FormatRule ¶ added in v0.22.0
type FormatRule uint8
FormatRule describes how to interpret the format.
type It ¶ added in v0.22.0
type It struct { miruken.CallbackBase // contains filtered or unexported fields }
It maps callbacks bivariantly.
func (*It) SetMatched ¶ added in v0.26.0
Click to show internal directories.
Click to hide internal directories.