Struct protobuf::well_known_types::Api[][src]

pub struct Api {
    pub name: String,
    pub methods: Vec<Method>,
    pub options: Vec<Option>,
    pub version: String,
    pub source_context: MessageField<SourceContext>,
    pub mixins: Vec<Mixin>,
    pub syntax: ProtobufEnumOrUnknown<Syntax>,
    pub unknown_fields: UnknownFields,
    pub cached_size: CachedSize,
}
Expand description

Api is a light-weight descriptor for an API Interface.

Interfaces are also described as “protocol buffer services” in some contexts, such as by the “service” keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as “APIs” in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.

Fields

name: String

The fully qualified name of this interface, including package name followed by the interface’s simple name.

methods: Vec<Method>

The methods of this interface, in unspecified order.

options: Vec<Option>

Any metadata attached to the interface.

version: String

A version string for this interface. If specified, must have the form major-version.minor-version, as in 1.10. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here.

The versioning schema uses semantic versioning where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan.

The major version is also reflected in the package name of the interface, which must end in v<major-version>, as in google.feature.v1. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces.

source_context: MessageField<SourceContext>

Source context for the protocol buffer service represented by this message.

mixins: Vec<Mixin>

Included interfaces. See Mixin.

syntax: ProtobufEnumOrUnknown<Syntax>

The source syntax of the service.

unknown_fields: UnknownFieldscached_size: CachedSize

Implementations

Trait Implementations

Clear this make, make it equivalent to newly created object.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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 !=.

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.