Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValueMapper ¶
type ValueMapper[V1, V2 comparable] struct { // contains filtered or unexported fields }
func MustNewValueMapper ¶
func MustNewValueMapper[V1, V2 comparable](m map[V1]V2) *ValueMapper[V1, V2]
func NewValueMapper ¶
func NewValueMapper[V1, V2 comparable](m map[V1]V2) (*ValueMapper[V1, V2], error)
func (*ValueMapper[V1, V2]) From ¶
func (m *ValueMapper[V1, V2]) From(v2 V2) (v1 V1, ok bool)
func (*ValueMapper[V1, V2]) FromMust ¶
func (m *ValueMapper[V1, V2]) FromMust(v2 V2) V1
func (*ValueMapper[V1, V2]) Into ¶
func (m *ValueMapper[V1, V2]) Into(v1 V1) (v2 V2, ok bool)
func (*ValueMapper[V1, V2]) IntoMust ¶
func (m *ValueMapper[V1, V2]) IntoMust(v1 V1) V2
Click to show internal directories.
Click to hide internal directories.