Source File
tl_bytes_gen.go
Belonging Package
github.com/gotd/td/tg
// Code generated by gotdgen, DO NOT EDIT.package tgimport ()// No-op definition for keeping imports.var (_ = bin.Buffer{}_ = context.Background()_ = fmt.Stringer(nil)_ = strings.Builder{}_ = errors.Is_ = multierr.AppendInto_ = sort.Ints_ = tdp.Format_ = tgerr.Error{}_ = tdjson.Encoder{})// Bytes represents TL type `bytes#e937bb82`.//// See https://core.telegram.org/constructor/bytes for reference.type Bytes struct {}// BytesTypeID is TL type id of Bytes.const BytesTypeID = 0xe937bb82// Ensuring interfaces in compile-time for Bytes.var (_ bin.Encoder = &Bytes{}_ bin.Decoder = &Bytes{}_ bin.BareEncoder = &Bytes{}_ bin.BareDecoder = &Bytes{})func ( *Bytes) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *Bytes) () string {if == nil {return "Bytes(nil)"}type Bytesreturn fmt.Sprintf("Bytes%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*Bytes) () uint32 {return BytesTypeID}// TypeName returns name of type in TL schema.func (*Bytes) () string {return "bytes"}// TypeInfo returns info about TL type.func ( *Bytes) () tdp.Type {:= tdp.Type{Name: "bytes",ID: BytesTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *Bytes) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode bytes#e937bb82 as nil")}.PutID(BytesTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *Bytes) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode bytes#e937bb82 as nil")}return nil}// Decode implements bin.Decoder.func ( *Bytes) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode bytes#e937bb82 to nil")}if := .ConsumeID(BytesTypeID); != nil {return fmt.Errorf("unable to decode bytes#e937bb82: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *Bytes) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode bytes#e937bb82 to nil")}return nil}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |