[][src]Struct prost_types::Api

pub struct Api {
    pub name: String,
    pub methods: Vec<Method>,
    pub options: Vec<Option>,
    pub version: String,
    pub source_context: Option<SourceContext>,
    pub mixins: Vec<Mixin>,
    pub syntax: i32,
}

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: Option<SourceContext>

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

mixins: Vec<Mixin>

Included interfaces. See Mixin.

syntax: i32

The source syntax of the service.

Methods

impl Api[src]

pub fn syntax(&self) -> Syntax[src]

pub fn set_syntax(&mut self, value: Syntax)[src]

Trait Implementations

impl PartialEq<Api> for Api[src]

impl Default for Api[src]

impl Clone for Api[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Api[src]

impl Message for Api[src]

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
    B: BufMut
[src]

Encodes the message to a buffer. Read more

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
    B: BufMut
[src]

Encodes the message with a length-delimiter to a buffer. Read more

fn decode<B>(buf: B) -> Result<Self, DecodeError> where
    B: IntoBuf,
    Self: Default
[src]

Decodes an instance of the message from a buffer. Read more

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
    B: IntoBuf,
    Self: Default
[src]

Decodes a length-delimited instance of the message from the buffer.

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
    B: IntoBuf
[src]

Decodes an instance of the message from a buffer, and merges it into self. Read more

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
    B: IntoBuf
[src]

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

Auto Trait Implementations

impl Send for Api

impl Sync for Api

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]