blob: 9a6a7e2cbcd9befa3c463c59abf1d7a4a2efc912 [file] [log] [blame]
// Code generated by fidlgen; DO NOT EDIT.
package errorsyntax
import (
testerrorsyntaxparent "fidl/test/errorsyntax/parent"
_bindings "syscall/zx/fidl"
)
type ExampleUseOfErrorSyntaxCallWhichMayFailResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Value int64 `fidl_offset_v2:"0"`
}
var _mExampleUseOfErrorSyntaxCallWhichMayFailResponse = _bindings.CreateLazyMarshaler(ExampleUseOfErrorSyntaxCallWhichMayFailResponse{})
func (msg *ExampleUseOfErrorSyntaxCallWhichMayFailResponse) Marshaler() _bindings.Marshaler {
return _mExampleUseOfErrorSyntaxCallWhichMayFailResponse
}
type exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"`
S string `fidl_offset_v2:"0" fidl_bounds:""`
}
var _mexampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailRequest = _bindings.CreateLazyMarshaler(exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailRequest{})
func (msg *exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailRequest) Marshaler() _bindings.Marshaler {
return _mexampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailRequest
}
type exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Result testerrorsyntaxparent.ParentUsesErrorSyntaxComposedCallWhichMayFailResult `fidl_offset_v2:"0"`
}
var _mexampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailResponse = _bindings.CreateLazyMarshaler(exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailResponse{})
func (msg *exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailResponse) Marshaler() _bindings.Marshaler {
return _mexampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailResponse
}
type exampleUseOfErrorSyntaxWithCtxCallWhichMayFailRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"`
S string `fidl_offset_v2:"0" fidl_bounds:""`
}
var _mexampleUseOfErrorSyntaxWithCtxCallWhichMayFailRequest = _bindings.CreateLazyMarshaler(exampleUseOfErrorSyntaxWithCtxCallWhichMayFailRequest{})
func (msg *exampleUseOfErrorSyntaxWithCtxCallWhichMayFailRequest) Marshaler() _bindings.Marshaler {
return _mexampleUseOfErrorSyntaxWithCtxCallWhichMayFailRequest
}
type exampleUseOfErrorSyntaxWithCtxCallWhichMayFailResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Result ExampleUseOfErrorSyntaxCallWhichMayFailResult `fidl_offset_v2:"0"`
}
var _mexampleUseOfErrorSyntaxWithCtxCallWhichMayFailResponse = _bindings.CreateLazyMarshaler(exampleUseOfErrorSyntaxWithCtxCallWhichMayFailResponse{})
func (msg *exampleUseOfErrorSyntaxWithCtxCallWhichMayFailResponse) Marshaler() _bindings.Marshaler {
return _mexampleUseOfErrorSyntaxWithCtxCallWhichMayFailResponse
}
type I_exampleUseOfErrorSyntaxCallWhichMayFailResultTag uint64
const (
ExampleUseOfErrorSyntaxCallWhichMayFailResultResponse = 1 // 0x00000001
ExampleUseOfErrorSyntaxCallWhichMayFailResultErr = 2 // 0x00000002
)
type ExampleUseOfErrorSyntaxCallWhichMayFailResult struct {
I_exampleUseOfErrorSyntaxCallWhichMayFailResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
Response ExampleUseOfErrorSyntaxCallWhichMayFailResponse `fidl_ordinal:"1"`
Err uint32 `fidl_ordinal:"2"`
}
var _mExampleUseOfErrorSyntaxCallWhichMayFailResult = _bindings.CreateLazyMarshaler(ExampleUseOfErrorSyntaxCallWhichMayFailResult{})
func (msg *ExampleUseOfErrorSyntaxCallWhichMayFailResult) Marshaler() _bindings.Marshaler {
return _mExampleUseOfErrorSyntaxCallWhichMayFailResult
}
func (_m *ExampleUseOfErrorSyntaxCallWhichMayFailResult) reset() {
switch _m.I_exampleUseOfErrorSyntaxCallWhichMayFailResultTag {
case 1:
var _zeroed ExampleUseOfErrorSyntaxCallWhichMayFailResponse
_m.Response = _zeroed
case 2:
var _zeroed uint32
_m.Err = _zeroed
}
}
func (_m *ExampleUseOfErrorSyntaxCallWhichMayFailResult) Which() I_exampleUseOfErrorSyntaxCallWhichMayFailResultTag {
return _m.I_exampleUseOfErrorSyntaxCallWhichMayFailResultTag
}
func (_m *ExampleUseOfErrorSyntaxCallWhichMayFailResult) Ordinal() uint64 {
return uint64(_m.I_exampleUseOfErrorSyntaxCallWhichMayFailResultTag)
}
func (_m *ExampleUseOfErrorSyntaxCallWhichMayFailResult) SetResponse(response ExampleUseOfErrorSyntaxCallWhichMayFailResponse) {
_m.reset()
_m.I_exampleUseOfErrorSyntaxCallWhichMayFailResultTag = ExampleUseOfErrorSyntaxCallWhichMayFailResultResponse
_m.Response = response
}
func ExampleUseOfErrorSyntaxCallWhichMayFailResultWithResponse(response ExampleUseOfErrorSyntaxCallWhichMayFailResponse) ExampleUseOfErrorSyntaxCallWhichMayFailResult {
var _u ExampleUseOfErrorSyntaxCallWhichMayFailResult
_u.SetResponse(response)
return _u
}
func (_m *ExampleUseOfErrorSyntaxCallWhichMayFailResult) SetErr(err uint32) {
_m.reset()
_m.I_exampleUseOfErrorSyntaxCallWhichMayFailResultTag = ExampleUseOfErrorSyntaxCallWhichMayFailResultErr
_m.Err = err
}
func ExampleUseOfErrorSyntaxCallWhichMayFailResultWithErr(err uint32) ExampleUseOfErrorSyntaxCallWhichMayFailResult {
var _u ExampleUseOfErrorSyntaxCallWhichMayFailResult
_u.SetErr(err)
return _u
}
const (
ExampleUseOfErrorSyntaxComposedCallWhichMayFailOrdinal uint64 = 0x3179cf8f46814221
ExampleUseOfErrorSyntaxCallWhichMayFailOrdinal uint64 = 0x3424ff83ce3004a2
)
type ExampleUseOfErrorSyntaxWithCtxInterface _bindings.ChannelProxy
func (p *ExampleUseOfErrorSyntaxWithCtxInterface) ComposedCallWhichMayFail(ctx_ _bindings.Context, s string) (testerrorsyntaxparent.ParentUsesErrorSyntaxComposedCallWhichMayFailResult, error) {
req_ := &exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailRequest{S: s}
resp_ := &exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ExampleUseOfErrorSyntaxComposedCallWhichMayFailOrdinal, req_, resp_)
return (*resp_).Result, err_
}
func (p *ExampleUseOfErrorSyntaxWithCtxInterface) CallWhichMayFail(ctx_ _bindings.Context, s string) (ExampleUseOfErrorSyntaxCallWhichMayFailResult, error) {
req_ := &exampleUseOfErrorSyntaxWithCtxCallWhichMayFailRequest{S: s}
resp_ := &exampleUseOfErrorSyntaxWithCtxCallWhichMayFailResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ExampleUseOfErrorSyntaxCallWhichMayFailOrdinal, req_, resp_)
return (*resp_).Result, err_
}
type ExampleUseOfErrorSyntaxWithCtx interface {
ComposedCallWhichMayFail(ctx_ _bindings.Context, s string) (testerrorsyntaxparent.ParentUsesErrorSyntaxComposedCallWhichMayFailResult, error)
CallWhichMayFail(ctx_ _bindings.Context, s string) (ExampleUseOfErrorSyntaxCallWhichMayFailResult, error)
}
type ExampleUseOfErrorSyntaxWithCtxTransitionalBase struct{}
type ExampleUseOfErrorSyntaxWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewExampleUseOfErrorSyntaxWithCtxInterfaceRequest() (ExampleUseOfErrorSyntaxWithCtxInterfaceRequest, *ExampleUseOfErrorSyntaxWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return ExampleUseOfErrorSyntaxWithCtxInterfaceRequest(req), (*ExampleUseOfErrorSyntaxWithCtxInterface)(cli), err
}
type ExampleUseOfErrorSyntaxWithCtxStub struct {
Impl ExampleUseOfErrorSyntaxWithCtx
}
func (s_ *ExampleUseOfErrorSyntaxWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case ExampleUseOfErrorSyntaxComposedCallWhichMayFailOrdinal:
in_ := &exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.ComposedCallWhichMayFail(args_.Ctx, (*in_).S)
out_ := &exampleUseOfErrorSyntaxWithCtxComposedCallWhichMayFailResponse{Result: result}
return out_, true, err_
case ExampleUseOfErrorSyntaxCallWhichMayFailOrdinal:
in_ := &exampleUseOfErrorSyntaxWithCtxCallWhichMayFailRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.CallWhichMayFail(args_.Ctx, (*in_).S)
out_ := &exampleUseOfErrorSyntaxWithCtxCallWhichMayFailResponse{Result: result}
return out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type ExampleUseOfErrorSyntaxEventProxy _bindings.ChannelProxy