當前位置: 首頁>>代碼示例>>Golang>>正文


Golang capnproto2.ToStruct函數代碼示例

本文整理匯總了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
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:8,代碼來源:botapi.capnp.go

示例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
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:8,代碼來源:test.capnp.go

示例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
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:8,代碼來源:botapi.capnp.go

示例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
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:8,代碼來源:test.capnp.go

示例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
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:8,代碼來源:test.capnp.go

示例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
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:8,代碼來源:test.capnp.go

示例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
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:8,代碼來源:test.capnp.go

示例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
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:8,代碼來源:hash.capnp.go

示例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
}
開發者ID:FiloSottile,項目名稱:go_serialization_benchmarks,代碼行數:8,代碼來源:structdef.capnp2.go

示例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
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:8,代碼來源:botapi.capnp.go

示例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
}
開發者ID:startupit69,項目名稱:go-capnproto2,代碼行數:8,代碼來源:books.capnp.go

示例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
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:8,代碼來源:botapi.capnp.go

示例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
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:8,代碼來源:botapi.capnp.go

示例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
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:8,代碼來源:botapi.capnp.go

示例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
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:8,代碼來源:botapi.capnp.go


注:本文中的zombiezen/com/go/capnproto2.ToStruct函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。