Skip to main content

ErrorKind

Enum ErrorKind 

Source
pub enum ErrorKind {
    MissingWrapper {
        expected: &'static str,
        found: String,
        suggestion: String,
    },
    EmptyGenericArgs {
        wrapper: &'static str,
    },
    UnsupportedType {
        name: String,
        reason: &'static str,
        suggestion: &'static str,
    },
    InvalidAttrValue {
        attr: String,
        expected: &'static str,
        found: String,
    },
    MissingRequiredAttr {
        attr: &'static str,
        context: &'static str,
    },
    ConflictingAttrs {
        first: String,
        second: String,
        suggestion: String,
    },
    MissingReturnType {
        fn_name: String,
    },
    InvalidHandlerSig {
        fn_name: String,
        reason: &'static str,
    },
    UnknownKey {
        key: String,
        valid_keys: &'static [&'static str],
    },
    SynError(Error),
}

Variants§

§

MissingWrapper

A type was found where a specific wrapper was expected.

Fields

§expected: &'static str
§found: String
§suggestion: String
§

EmptyGenericArgs

A wrapper type has no generic arguments (e.g. bare Json instead of Json<T>).

Fields

§wrapper: &'static str
§

UnsupportedType

A type that orpc does not know how to handle appears in a handler signature.

Fields

§name: String
§reason: &'static str
§suggestion: &'static str
§

InvalidAttrValue

An attribute key has a value of the wrong kind (e.g. non-string literal).

Fields

§attr: String
§expected: &'static str
§found: String
§

MissingRequiredAttr

A required attribute key is absent.

Fields

§attr: &'static str
§context: &'static str
§

ConflictingAttrs

Two attribute keys that cannot coexist were both provided.

Fields

§first: String
§second: String
§suggestion: String
§

MissingReturnType

A handler function has no return type annotation.

Fields

§fn_name: String
§

InvalidHandlerSig

A handler function’s signature does not match the expected shape.

Fields

§fn_name: String
§reason: &'static str
§

UnknownKey

An unrecognised key was provided in a macro attribute.

Fields

§valid_keys: &'static [&'static str]
§

SynError(Error)

A syn parse error forwarded directly.

Trait Implementations§

Source§

impl Debug for ErrorKind

Source§

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

Formats the value using the given formatter. Read more

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.