assert

package
v4.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertBinding

func AssertBinding(obj any) bool

AssertBinding assert Binding interface for obj

func AssertRender

func AssertRender(obj any) bool

AssertRender assert Render interface for obj

func Register

func Register(ta TypeAssertor)

Register register custom TypeAssertor to assert Binding/Render interface

func RegisterType

func RegisterType[T any]()

RegisterType[T] register custom TypeAssertor to assert Binding[T]/Render[T] interface

func RegisterType2

func RegisterType2[B, R any]()

RegisterType2[B, R] register custom TypeAssertor to assert Binding[B]/Render[R] interface

func RegisterType3

func RegisterType3[B, P, R any]()

RegisterType2[B, P, R] register custom TypeAssertor to assert Binding[B]/Render[R] interface

func RegisterType4 added in v4.1.0

func RegisterType4[C, T any]()

RegisterType4[C, T] register custom TypeAssertor to assert C, T interface

Types

type Binding

type Binding[T any] interface {
	Bind(T) mir.Error
}

Binding[T] binding interface for custom T context

type Binding2

type Binding2[R, P any] interface {
	Bind(R, P) mir.Error
}

Binding2[R, P] binding interface for custom R, P context

type Render

type Render[T any] interface {
	Render(T)
}

Render[T] render interface for custom T context

type Render2 added in v4.1.0

type Render2[C, T any] interface {
	Render(C, T)
}

Render[C, T] render interface for custom C, T context

type TypeAssertor

type TypeAssertor interface {
	AssertBinding(any) bool
	AssertRender(any) bool
}

TypeAssertor type assert for Binding and Render interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL