assert

package
v4.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Jun 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 register custom TypeAssertor to assert Binding[T]/Render[T] interface

Types

type Binding

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

Binding[T] binding interface for custom T context

type Render

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

Render[T] render interface for custom 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