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


Golang capnproto2.NewRootStruct函數代碼示例

本文整理匯總了Golang中zombiezen/com/go/capnproto2.NewRootStruct函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewRootStruct函數的具體用法?Golang NewRootStruct怎麽用?Golang NewRootStruct使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NewRootStruct函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: NewRootHash_write_Params

func NewRootHash_write_Params(s *capnp.Segment) (Hash_write_Params, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
	if err != nil {
		return Hash_write_Params{}, err
	}
	return Hash_write_Params{st}, nil
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:7,代碼來源:hash.capnp.go

示例2: NewRootBook

func NewRootBook(s *capnp.Segment) (Book, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1})
	if err != nil {
		return Book{}, err
	}
	return Book{st}, nil
}
開發者ID:startupit69,項目名稱:go-capnproto2,代碼行數:7,代碼來源:books.capnp.go

示例3: NewRootHashFactory_newSha1_Results

func NewRootHashFactory_newSha1_Results(s *capnp.Segment) (HashFactory_newSha1_Results, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
	if err != nil {
		return HashFactory_newSha1_Results{}, err
	}
	return HashFactory_newSha1_Results{st}, nil
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:7,代碼來源:hash.capnp.go

示例4: NewRootAiConnector_connect_Results

func NewRootAiConnector_connect_Results(s *capnp.Segment) (AiConnector_connect_Results, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
	if err != nil {
		return AiConnector_connect_Results{}, err
	}
	return AiConnector_connect_Results{st}, nil
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:7,代碼來源:botapi.capnp.go

示例5: NewRootReplay_Round

func NewRootReplay_Round(s *capnp.Segment) (Replay_Round, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
	if err != nil {
		return Replay_Round{}, err
	}
	return Replay_Round{st}, nil
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:7,代碼來源:botapi.capnp.go

示例6: NewRootRobot

func NewRootRobot(s *capnp.Segment) (Robot, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 16, PointerCount: 0})
	if err != nil {
		return Robot{}, err
	}
	return Robot{st}, nil
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:7,代碼來源:botapi.capnp.go

示例7: NewRootAi_takeTurn_Params

func NewRootAi_takeTurn_Params(s *capnp.Segment) (Ai_takeTurn_Params, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
	if err != nil {
		return Ai_takeTurn_Params{}, err
	}
	return Ai_takeTurn_Params{st}, nil
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:7,代碼來源:botapi.capnp.go

示例8: NewRootCredentials

func NewRootCredentials(s *capnp.Segment) (Credentials, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
	if err != nil {
		return Credentials{}, err
	}
	return Credentials{st}, nil
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:7,代碼來源:botapi.capnp.go

示例9: NewRootCapnp2A

func NewRootCapnp2A(s *capnp.Segment) (Capnp2A, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 24, PointerCount: 2})
	if err != nil {
		return Capnp2A{}, err
	}
	return Capnp2A{st}, nil
}
開發者ID:FiloSottile,項目名稱:go_serialization_benchmarks,代碼行數:7,代碼來源:structdef.capnp2.go

示例10: NewRootHandleFactory_newHandle_Params

func NewRootHandleFactory_newHandle_Params(s *capnp.Segment) (HandleFactory_newHandle_Params, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
	if err != nil {
		return HandleFactory_newHandle_Params{}, err
	}
	return HandleFactory_newHandle_Params{st}, nil
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:7,代碼來源:test.capnp.go

示例11: NewRootTurn

func NewRootTurn(s *capnp.Segment) (Turn, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0})
	if err != nil {
		return Turn{}, err
	}
	return Turn{st}, nil
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:7,代碼來源:botapi.capnp.go

示例12: NewRootConnectRequest

func NewRootConnectRequest(s *capnp.Segment) (ConnectRequest, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
	if err != nil {
		return ConnectRequest{}, err
	}
	return ConnectRequest{st}, nil
}
開發者ID:gophergala2016,項目名稱:Gobots,代碼行數:7,代碼來源:botapi.capnp.go

示例13: NewRootHanger_hang_Results

func NewRootHanger_hang_Results(s *capnp.Segment) (Hanger_hang_Results, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
	if err != nil {
		return Hanger_hang_Results{}, err
	}
	return Hanger_hang_Results{st}, nil
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:7,代碼來源:test.capnp.go

示例14: NewRootAdder_add_Results

func NewRootAdder_add_Results(s *capnp.Segment) (Adder_add_Results, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0})
	if err != nil {
		return Adder_add_Results{}, err
	}
	return Adder_add_Results{st}, nil
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:7,代碼來源:test.capnp.go

示例15: NewRootCallOrder_getCallSequence_Results

func NewRootCallOrder_getCallSequence_Results(s *capnp.Segment) (CallOrder_getCallSequence_Results, error) {
	st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0})
	if err != nil {
		return CallOrder_getCallSequence_Results{}, err
	}
	return CallOrder_getCallSequence_Results{st}, nil
}
開發者ID:hodduc,項目名稱:go-capnproto2,代碼行數:7,代碼來源:test.capnp.go


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