[][src]Struct prost_types::compiler::CodeGeneratorResponse

pub struct CodeGeneratorResponse {
    pub error: Option<String>,
    pub supported_features: Option<u64>,
    pub file: Vec<File>,
}

The plugin writes an encoded CodeGeneratorResponse to stdout.

Fields

error: Option<String>

Error message. If non-empty, code generation failed. The plugin process should exit with status code zero even if it reports an error in this way.

This should be used to indicate errors in .proto files which prevent the code generator from generating correct code. Errors which indicate a problem in protoc itself -- such as the input CodeGeneratorRequest being unparseable -- should be reported by writing a message to stderr and exiting with a non-zero status code.

supported_features: Option<u64>

A bitmask of supported features that the code generator supports. This is a bitwise "or" of values from the Feature enum.

file: Vec<File>

Implementations

impl CodeGeneratorResponse[src]

pub fn error(&self) -> &str[src]

Returns the value of error, or the default value if error is unset.

pub fn supported_features(&self) -> u64[src]

Returns the value of supported_features, or the default value if supported_features is unset.

Trait Implementations

impl Clone for CodeGeneratorResponse[src]

impl Debug for CodeGeneratorResponse[src]

impl Default for CodeGeneratorResponse[src]

impl Message for CodeGeneratorResponse[src]

impl PartialEq<CodeGeneratorResponse> for CodeGeneratorResponse[src]

impl StructuralPartialEq for CodeGeneratorResponse[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.