Skip to main content

CodegenErrKind

Enum CodegenErrKind 

Source
pub enum CodegenErrKind {
Show 17 variants InvalidPluginOption, UnknownPluginOption, OpenApiPluginFailed, OpenApiInvalidDocument, OpenApiMergeConflict, AsyncApiInvalidDocument, FileToGenerateNotFound, InvalidDescriptor, InvalidHttpAnnotation, UnsupportedHttpRule, PathFieldNotFound, RequestMessageNotFound, BodyFieldNotFound, TypeResolutionFailed, DuplicateGeneratedIdentifier, DuplicateRoute, ApiNameCollision,
}
Expand description

Error categories produced by the connect2axum protoc generators.

Variants§

§

InvalidPluginOption

A known plugin option was present but had an invalid value.

§

UnknownPluginOption

The plugin parameter string contained an unsupported option name.

§

OpenApiPluginFailed

The wrapped grpc-gateway OpenAPI generator failed.

§

OpenApiInvalidDocument

The OpenAPI document was not valid JSON or failed structural validation.

§

OpenApiMergeConflict

Multiple OpenAPI documents could not be merged safely.

§

AsyncApiInvalidDocument

The generated AsyncAPI document failed structural validation.

§

FileToGenerateNotFound

A requested file_to_generate was missing from the descriptor set.

§

InvalidDescriptor

A protobuf descriptor was malformed or incomplete.

§

InvalidHttpAnnotation

A google.api.http annotation could not be decoded.

§

UnsupportedHttpRule

A google.api.http rule used an unsupported binding shape.

§

PathFieldNotFound

A field referenced by a path template was missing from the request message.

§

RequestMessageNotFound

A method request message could not be resolved.

§

BodyFieldNotFound

A field referenced by an HTTP body option was missing from the request message.

§

TypeResolutionFailed

A protobuf type could not be mapped to the generated Rust type path.

§

DuplicateGeneratedIdentifier

Generated Rust identifiers would collide.

§

DuplicateRoute

Two generated handlers would register the same HTTP route.

§

ApiNameCollision

Short API document component names would collide.

Trait Implementations§

Source§

impl Clone for CodegenErrKind

Source§

fn clone(&self) -> CodegenErrKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CodegenErrKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl UniKind for CodegenErrKind

Source§

fn context(&self, _cause: Option<Cause<'_>>) -> Option<Cow<'static, str>>

Returns additional context for this specific kind, if any. Defaults to None.
Source§

fn value(&self, _cause: Option<Cause<'_>>) -> Cow<'static, str>

The string value of the kind, if any. This is useful for programmatic evaluation when the type is boxed in the error chain and the type is not known. Defaults to "".
Source§

fn code(&self, _cause: Option<Cause<'_>>) -> i32

Returns the code (typically for FFI) for this specific kind. Defaults to -1.
Source§

fn code2(&self, _cause: Option<Cause<'_>>) -> i32

Returns a 2nd code (typically for FFI) for this specific kind. Defaults to -1.
Source§

fn type_name(&self) -> &'static str

Returns the concrete type name.
Source§

fn into_error(self) -> UniError<Self>
where Self: Sized,

Converts the UniKind into a UniError with the same kind.
Source§

impl Copy for CodegenErrKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.