本文整理匯總了Golang中zombiezen/com/go/capnproto2.ToStruct函數的典型用法代碼示例。如果您正苦於以下問題:Golang ToStruct函數的具體用法?Golang ToStruct怎麽用?Golang ToStruct使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了ToStruct函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: ReadRootAiConnector_connect_Results
func ReadRootAiConnector_connect_Results(msg *capnp.Message) (AiConnector_connect_Results, error) {
root, err := msg.Root()
if err != nil {
return AiConnector_connect_Results{}, err
}
st := capnp.ToStruct(root)
return AiConnector_connect_Results{st}, nil
}
示例2: ReadRootAdder_add_Results
func ReadRootAdder_add_Results(msg *capnp.Message) (Adder_add_Results, error) {
root, err := msg.Root()
if err != nil {
return Adder_add_Results{}, err
}
st := capnp.ToStruct(root)
return Adder_add_Results{st}, nil
}
示例3: ReadRootTurn
func ReadRootTurn(msg *capnp.Message) (Turn, error) {
root, err := msg.Root()
if err != nil {
return Turn{}, err
}
st := capnp.ToStruct(root)
return Turn{st}, nil
}
示例4: ReadRootCallOrder_getCallSequence_Results
func ReadRootCallOrder_getCallSequence_Results(msg *capnp.Message) (CallOrder_getCallSequence_Results, error) {
root, err := msg.Root()
if err != nil {
return CallOrder_getCallSequence_Results{}, err
}
st := capnp.ToStruct(root)
return CallOrder_getCallSequence_Results{st}, nil
}
示例5: ReadRootEchoer_echo_Results
func ReadRootEchoer_echo_Results(msg *capnp.Message) (Echoer_echo_Results, error) {
root, err := msg.Root()
if err != nil {
return Echoer_echo_Results{}, err
}
st := capnp.ToStruct(root)
return Echoer_echo_Results{st}, nil
}
示例6: ReadRootHandleFactory_newHandle_Params
func ReadRootHandleFactory_newHandle_Params(msg *capnp.Message) (HandleFactory_newHandle_Params, error) {
root, err := msg.Root()
if err != nil {
return HandleFactory_newHandle_Params{}, err
}
st := capnp.ToStruct(root)
return HandleFactory_newHandle_Params{st}, nil
}
示例7: ReadRootHanger_hang_Results
func ReadRootHanger_hang_Results(msg *capnp.Message) (Hanger_hang_Results, error) {
root, err := msg.Root()
if err != nil {
return Hanger_hang_Results{}, err
}
st := capnp.ToStruct(root)
return Hanger_hang_Results{st}, nil
}
示例8: ReadRootHashFactory_newSha1_Results
func ReadRootHashFactory_newSha1_Results(msg *capnp.Message) (HashFactory_newSha1_Results, error) {
root, err := msg.Root()
if err != nil {
return HashFactory_newSha1_Results{}, err
}
st := capnp.ToStruct(root)
return HashFactory_newSha1_Results{st}, nil
}
示例9: ReadRootCapnp2A
func ReadRootCapnp2A(msg *capnp.Message) (Capnp2A, error) {
root, err := msg.Root()
if err != nil {
return Capnp2A{}, err
}
st := capnp.ToStruct(root)
return Capnp2A{st}, nil
}
示例10: ReadRootConnectRequest
func ReadRootConnectRequest(msg *capnp.Message) (ConnectRequest, error) {
root, err := msg.Root()
if err != nil {
return ConnectRequest{}, err
}
st := capnp.ToStruct(root)
return ConnectRequest{st}, nil
}
示例11: ReadRootBook
func ReadRootBook(msg *capnp.Message) (Book, error) {
root, err := msg.Root()
if err != nil {
return Book{}, err
}
st := capnp.ToStruct(root)
return Book{st}, nil
}
示例12: ReadRootReplay_Round
func ReadRootReplay_Round(msg *capnp.Message) (Replay_Round, error) {
root, err := msg.Root()
if err != nil {
return Replay_Round{}, err
}
st := capnp.ToStruct(root)
return Replay_Round{st}, nil
}
示例13: ReadRootRobot
func ReadRootRobot(msg *capnp.Message) (Robot, error) {
root, err := msg.Root()
if err != nil {
return Robot{}, err
}
st := capnp.ToStruct(root)
return Robot{st}, nil
}
示例14: ReadRootAi_takeTurn_Params
func ReadRootAi_takeTurn_Params(msg *capnp.Message) (Ai_takeTurn_Params, error) {
root, err := msg.Root()
if err != nil {
return Ai_takeTurn_Params{}, err
}
st := capnp.ToStruct(root)
return Ai_takeTurn_Params{st}, nil
}
示例15: ReadRootCredentials
func ReadRootCredentials(msg *capnp.Message) (Credentials, error) {
root, err := msg.Root()
if err != nil {
return Credentials{}, err
}
st := capnp.ToStruct(root)
return Credentials{st}, nil
}