Struct protobuf::descriptor::FileDescriptorProto [−][src]
pub struct FileDescriptorProto {
pub dependency: Vec<String>,
pub public_dependency: Vec<i32>,
pub weak_dependency: Vec<i32>,
pub message_type: Vec<DescriptorProto>,
pub enum_type: Vec<EnumDescriptorProto>,
pub service: Vec<ServiceDescriptorProto>,
pub extension: Vec<FieldDescriptorProto>,
pub options: MessageField<FileOptions>,
pub source_code_info: MessageField<SourceCodeInfo>,
pub unknown_fields: UnknownFields,
pub cached_size: CachedSize,
// some fields omitted
}
Expand description
Describes a complete .proto file.
Fields
dependency: Vec<String>
Names of files imported by this file.
public_dependency: Vec<i32>
Indexes of the public imported files in the dependency list above.
weak_dependency: Vec<i32>
Indexes of the weak imported files in the dependency list. For Google-internal migration only. Do not use.
message_type: Vec<DescriptorProto>
All top-level definitions in this file.
enum_type: Vec<EnumDescriptorProto>
service: Vec<ServiceDescriptorProto>
extension: Vec<FieldDescriptorProto>
options: MessageField<FileOptions>
source_code_info: MessageField<SourceCodeInfo>
This field contains optional information about the original source code. You may safely remove this entire field without harming runtime functionality of the descriptors – the information is needed only by development tools.
unknown_fields: UnknownFields
cached_size: CachedSize
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
Returns the “default value” for a type. Read more
True iff all required fields are initialized.
Always returns true
for protobuf 3. Read more
Update this message object with fields read from given stream.
Compute and cache size of this message and all nested messages
Write message to the stream. Read more
Get size previously computed by compute_size
.
Get a reference to unknown fields.
Get a mutable reference to unknown fields.
Create an empty message object. Read more
Get message descriptor for message type. Read more
Return a pointer to default immutable message with static lifetime. Read more
Message descriptor for this message, used for reflection. Read more
Parse message from stream.
Write the message to the stream. Read more
Write the message to the stream prepending the message with message length encoded as varint. Read more
Write the message to the vec, prepend the message with message length encoded as varint. Read more
Update this message object with fields read from given stream.
Parse message from reader. Parse stops on EOF or when error encountered. Read more
Parse message from byte array.
Check if all required fields of this object are initialized.
Write the message to the writer.
Write the message to bytes vec.
Write the message to bytes vec. Read more
Write the message to the writer, prepend the message with message length encoded as varint. Read more
Write the message to the bytes vec, prepend the message with message length encoded as varint. Read more
Reflective equality. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type RuntimeType = RuntimeTypeMessage<Self>
type RuntimeType = RuntimeTypeMessage<Self>
Actual implementation of type properties.
Dynamic version of the type.
Pointer to a dynamic reference.
Mutable pointer to a dynamic mutable reference.
Construct a value from given reflective value. Read more
Write the value.
Default value for this type.
Convert a value into a ref value if possible. Read more
Value is non-default?
Auto Trait Implementations
impl RefUnwindSafe for FileDescriptorProto
impl Send for FileDescriptorProto
impl Sync for FileDescriptorProto
impl Unpin for FileDescriptorProto
impl UnwindSafe for FileDescriptorProto
Blanket Implementations
Mutably borrows from an owned value. Read more