微服务间通信
服务同目录下序列化
type Pair struct {
weaver.AutoMarshal
x, y int
}// 错误:NotSerializable不能变得可序列化。
type NotSerializable struct {
weaver.AutoMarshal
f func() // 函数不是可序列化的
c chan int // chans不是可序列化的
}// 错误:不能在泛型结构体中嵌入weaver.AutoMarshal。
type Pair[A any] struct {
weaver.AutoMarshal
x A
y A
}不同目录下的序列化
最后更新于