From e15b2987472495f61dfce6fbf592afec60e188da Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 21 Feb 2024 17:15:25 +0000 Subject: [PATCH] build based on 80d7a0a --- dev/faq/index.html | 2 +- dev/index.html | 2 +- dev/reference/index.html | 2 +- dev/search/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/faq/index.html b/dev/faq/index.html index 4c20166..b63589a 100644 --- a/dev/faq/index.html +++ b/dev/faq/index.html @@ -12,4 +12,4 @@ elseif one_of_field === :option2 do_someting_else(one_of_field[]) # ... -end

How complete is this package?

The package should have fairly complete support for both proto2 and proto3 syntaxes with the following exceptions:

Future development will focus on Services and RPC with an overall goal of getting a new, native Julia gRPC implementation.

+end

How complete is this package?

The package should have fairly complete support for both proto2 and proto3 syntaxes with the following exceptions:

Future development will focus on Services and RPC with an overall goal of getting a new, native Julia gRPC implementation.

diff --git a/dev/index.html b/dev/index.html index c4e1c9b..81e0fbb 100644 --- a/dev/index.html +++ b/dev/index.html @@ -89,4 +89,4 @@ ├── foo_bar.jl # defines module `foo_bar`, imports `baz_grok` └── baz_grok ├── {file_name}_pb.jl - └── baz_grok.jl # defines module `baz_grok`, includes `{file_name}_pb.jl`

You should include the top-level module of a generated package, i.e. foo_bar.jl in this example. When reading .proto files that use import statements, the imported files have to be located at the respective import paths relative to search_directories.

.proto files that don't have a package specifier will generate a single file containing a module. For example, {file_name}.proto will translate to a {file_name}_pb.jl file defining a {file_name}_pb module. You can generate a file without a module by providing always_use_modules=false options to protojl.

Constructors

By default, there are no additional constructors generated for the Julia structs. You can use the add_kwarg_contructors=true option to protojl to create outer constructors that accept keyword arguments and provide default values where available.

+ └── baz_grok.jl # defines module `baz_grok`, includes `{file_name}_pb.jl`

You should include the top-level module of a generated package, i.e. foo_bar.jl in this example. When reading .proto files that use import statements, the imported files have to be located at the respective import paths relative to search_directories.

.proto files that don't have a package specifier will generate a single file containing a module. For example, {file_name}.proto will translate to a {file_name}_pb.jl file defining a {file_name}_pb module. You can generate a file without a module by providing always_use_modules=false options to protojl.

Constructors

By default, there are no additional constructors generated for the Julia structs. You can use the add_kwarg_contructors=true option to protojl to create outer constructors that accept keyword arguments and provide default values where available.

diff --git a/dev/reference/index.html b/dev/reference/index.html index 523f8d7..4651b6d 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -27,4 +27,4 @@ struct MyMessage{T1<:Union{Nothing, OneOf{<:Union{Int, String}}}} oneof_field::T1 end -- `common_abstract_type::Bool=false`: When `true`, all generated structs will subtype `ProtoBuf.AbstractProtoBufMessage`.

Notes

We use relative_paths and search_directories instead of absolute paths to resolve proto import statements which are using relative paths.

source

Encoding and Decoding

ProtoBuf.Codecs.encodeMethod
encode(d::AbstractProtoDecoder, x::T) where {T}

Encode struct x of type T as protobuf message to IO wrapped by AbstractProtoEncoder.

For general structs, these methods should be generated using the protojl function.

source
ProtoBuf.Codecs.decodeMethod
decode(d::AbstractProtoDecoder, ::Type{T}) where {T}

Decode a protobuf message from IO wrapped by AbstractProtoDecoder into s struct of type T.

For general structs, these methods should be generated using the protojl function.

source

Metadata

ProtoBuf.reserved_fieldsFunction
reserved_fields(::Type{T}) where T

Return a named tuple of reserved field names and numbers from the original proto message definition. The numbers might be individual integers or integer ranges.

source
ProtoBuf.extendable_field_numbersFunction
extendable_field_numbers(::Type{T}) where T

Return extensions field numbers from the original proto message definition. The numbers might be individual integers or integer ranges.

source
ProtoBuf.oneof_field_typesFunction
oneof_field_types(::Type{T}) where T

Return a named tuple of oneof field names to the full NamedTuple type describing the type individual oneof options. Returns an empty named tuple, (;), if the original proto message doesn't contain any oneof fields

source
ProtoBuf.field_numbersFunction
field_numbers(::Type{T}) where T

Return a named tuple of fields names to their respective field numbers from the original proto message type. Fields of OneOf types are expanded as they don't map to any single field number.

source
ProtoBuf.default_valuesFunction
default_values(::Type{T}) where T

Return a named tuple of fields names to their respective default values from the original proto message type. Fields of OneOf types are expanded as they don't map to any single default value.

required message-fields do not have a default value and are represented as Ref{MyFieldMessageType}().

source
+- `common_abstract_type::Bool=false`: When `true`, all generated structs will subtype `ProtoBuf.AbstractProtoBufMessage`.

Notes

We use relative_paths and search_directories instead of absolute paths to resolve proto import statements which are using relative paths.

source

Encoding and Decoding

ProtoBuf.Codecs.encodeMethod
encode(d::AbstractProtoDecoder, x::T) where {T}

Encode struct x of type T as protobuf message to IO wrapped by AbstractProtoEncoder.

For general structs, these methods should be generated using the protojl function.

source
ProtoBuf.Codecs.decodeMethod
decode(d::AbstractProtoDecoder, ::Type{T}) where {T}

Decode a protobuf message from IO wrapped by AbstractProtoDecoder into s struct of type T.

For general structs, these methods should be generated using the protojl function.

source

Metadata

ProtoBuf.reserved_fieldsFunction
reserved_fields(::Type{T}) where T

Return a named tuple of reserved field names and numbers from the original proto message definition. The numbers might be individual integers or integer ranges.

source
ProtoBuf.extendable_field_numbersFunction
extendable_field_numbers(::Type{T}) where T

Return extensions field numbers from the original proto message definition. The numbers might be individual integers or integer ranges.

source
ProtoBuf.oneof_field_typesFunction
oneof_field_types(::Type{T}) where T

Return a named tuple of oneof field names to the full NamedTuple type describing the type individual oneof options. Returns an empty named tuple, (;), if the original proto message doesn't contain any oneof fields

source
ProtoBuf.field_numbersFunction
field_numbers(::Type{T}) where T

Return a named tuple of fields names to their respective field numbers from the original proto message type. Fields of OneOf types are expanded as they don't map to any single field number.

source
ProtoBuf.default_valuesFunction
default_values(::Type{T}) where T

Return a named tuple of fields names to their respective default values from the original proto message type. Fields of OneOf types are expanded as they don't map to any single default value.

required message-fields do not have a default value and are represented as Ref{MyFieldMessageType}().

source
diff --git a/dev/search/index.html b/dev/search/index.html index 893bc26..ca9ad53 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · ProtoBuf.jl

Loading search...

    +Search · ProtoBuf.jl

    Loading search...